### Get help for Drupal Quick Start options Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt Lists available configuration options for the `quick-start` command, allowing customization of the installation process. ```bash vendor/bin/dr quick-start --help ``` -------------------------------- ### Run Drupal Quick Start installation Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt This command initiates a standard Drupal installation using the built-in web server. It's suitable for development and not for production. ```bash cd drupal && php -d memory_limit=256M vendor/bin/dr quick-start standard ``` -------------------------------- ### Interactive Program Notice Example Source: https://github.com/drupal/core/blob/11.x/lib/Drupal/Component/ClassFinder/LICENSE.txt This is a sample notice to display when a program starts in interactive mode. It includes version information, copyright, warranty disclaimer, and information on redistribution rights. ```text Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. ``` -------------------------------- ### Install Dependencies Source: https://github.com/drupal/core/blob/11.x/assets/vendor/tabbable/README.txt Installs the necessary dependencies for the tabbable library using yarn. ```bash yarn install ``` -------------------------------- ### Copy example.sites.php to sites.php Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt To enable multisite functionality, copy the example sites configuration file to sites.php. This is the first step in setting up multiple sites. ```bash $ cp sites/example.sites.php sites/sites.php ``` -------------------------------- ### Create a new Drupal project using Composer Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt Use this command to create a new Drupal project with recommended settings. It installs Drupal and its dependencies. ```bash composer create-project drupal/recommended-project drupal ``` -------------------------------- ### Troubleshoot PHPUnit File Permissions Source: https://github.com/drupal/core/blob/11.x/tests/README.md Example command to invoke PHPUnit with elevated privileges to resolve file permission issues during test execution. ```bash sudo -u www-data ./vendor/bin/phpunit -c /path/to/your/phpunit.xml --group group_name ``` -------------------------------- ### Move Drupal installation to web server directory Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt After creating the Drupal project, use this command to move the files into your web server's document root or public HTML directory. ```bash mv my_site_name /path/to/your/installation ``` -------------------------------- ### Start ChromeDriver for JavaScript Tests Source: https://github.com/drupal/core/blob/11.x/tests/README.md Launch the ChromeDriver executable to enable running Functional JavaScript tests. Ensure it's running on the specified port. ```bash /path/to/chromedriver --port=4444 ``` -------------------------------- ### Scheduling Cron Jobs with Crontab and Wget Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt An example crontab entry using wget to visit the Drupal cron page hourly. Replace the placeholder URL with your site's actual cron key and domain. ```bash 0 * * * * wget -O - -q -t 1 http://example.com/cron/YOURKEY ``` -------------------------------- ### Install PHP Development Dependencies Source: https://github.com/drupal/core/blob/11.x/tests/README.md Install Drupal core development dependencies using Composer. These should not be installed on a production site. ```bash composer install ``` -------------------------------- ### Copy default.settings.php for a new site Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt Create a new site's configuration by copying the default settings file to a new directory named after the site's domain. This file will contain the specific configuration for that site. ```bash $ cp sites/default/default.settings.php sites/example.com/settings.php ``` -------------------------------- ### Revert Write Permissions for settings.php Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt Revert write permissions for the settings.php file after installation. ```bash chmod go-w sites/default/settings.php ``` -------------------------------- ### Revert Write Permissions for sites/default Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt Revert write permissions for the sites/default directory after installation. ```bash chmod go-w sites/default ``` -------------------------------- ### Build for Production Source: https://github.com/drupal/core/blob/11.x/assets/vendor/tabbable/README.txt Builds the tabbable library files for production, creating an index.umd.min.js file in the dist/ directory. ```bash yarn build ``` -------------------------------- ### Create and Set Permissions for New Uploads Directory Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt Create a new directory for uploaded files and grant write permissions to the web server. ```bash mkdir uploads chmod a+w uploads ``` -------------------------------- ### Copy Default Settings File Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt Copy the default settings file to create the actual settings.php file. ```bash cp sites/default/default.settings.php sites/default/settings.php ``` -------------------------------- ### Create Public Files Directory Source: https://github.com/drupal/core/blob/11.x/INSTALL.txt Manually create the public files directory and set write permissions for the web server. ```bash mkdir sites/default/files chmod a+w sites/default/files ``` -------------------------------- ### Navigate to Fixture Directory and Run Scaffold Command Source: https://github.com/drupal/core/blob/11.x/tests/Drupal/Tests/Composer/Plugin/Scaffold/fixtures/README.md After setting the SCAFFOLD_FIXTURE_DIR, navigate into the specified fixture directory and then into the drupal-drupal subdirectory. Finally, execute the composer drupal:scaffold command to perform scaffolding. ```bash $ cd $HOME/tmp/scaffold-fixtures $ cd drupal-drupal $ composer drupal:scaffold ``` -------------------------------- ### URLs with query parameters Source: https://github.com/drupal/core/blob/11.x/modules/filter/tests/filter.url-input.txt Illustrates different URL variations with query parameters, including case sensitivity. ```html https://test.com/?search=test https://test.com/?search=Test https://test.com/?search=tesT ``` -------------------------------- ### URLs with HTML entities and tags Source: https://github.com/drupal/core/blob/11.x/modules/filter/tests/filter.url-output.txt Demonstrates URL handling in the presence of HTML entities like <br/> and other HTML tags. ```html Test <br/>: This is just a www.test.com. paragraph with some https://www.test.com urls thrown in. *
This is just a www.test.com paragraph *
with some https://www.test.com urls thrown in. *
This is just a www.test.com paragraph person@test.com with some https://www.test.com urls *img* thrown in. This is just a www.test.com paragraph with some https://www.test.com urls thrown in. This is just a www.test.com paragraph person@test.com with some https://www.test.com urls thrown in. ``` ```html This is just a www.test.com paragraph with some https://www.test.com urls thrown in.
This is just a www.test.com paragraph with some https://www.test.com urls thrown in. This is just a www.test.com paragraph person@test.com with some https://www.test.com urls thrown in. This is just a www.test.com paragraph with some https://www.test.com urls thrown in. This is just a www.test.com paragraph person@test.com with some https://www.test.com urls thrown in. ``` -------------------------------- ### Standard GPL Copyright Notice Source: https://github.com/drupal/core/blob/11.x/lib/Drupal/Component/ClassFinder/LICENSE.txt This is the standard notice to include at the beginning of each source file when distributing a program under the GPL. It specifies the program's name, copyright year and author, and licensing terms. ```text Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ``` -------------------------------- ### Create MySQL Database Source: https://github.com/drupal/core/blob/11.x/INSTALL.mysql.txt Use this command to create a new database for your Drupal site. Replace 'username' and 'database_name' with your specific values. ```bash mysqladmin -u username -p create database_name ``` -------------------------------- ### Run FileSystem Component Tests Source: https://github.com/drupal/core/blob/11.x/lib/Drupal/Component/FileSystem/TESTING.txt Use this command to execute only the tests for the FileSystem component. Ensure you are in the root of the Drupal repository. ```bash ./vendor/bin/phpunit -c core --group FileSystem ```