Creating a Drupal website

Posted under » Drupal on 06 March 2021

This is applicable to Drupal version 9.

  1. download a copy of drupal and setup the Apache. Restart your web server
  2. create a mysql database. Preferable to use the same name as your website
  3. go to /sites folder and change sites.php
  4. create a folder under sites using the same domain name. Eg. test.drupal.com This is because of drupal multi sites capability
  5. Make sure you have enabled mod-rewrite. There are other requirements which you need to fulfil.
  6. Use your browser to go your website. It will redirect you to the install page. eg. http://test.drupal.com/core/install.php
  7. Copy the default settings file like sites/test.drupal.com/settings.php and make it writable
  8. with the mysql password and all, setup your drupal. The install script will write the setup on the settings.php file for you.
  9. Install will then populate the mysql database. Make sure your mysql priviledges are correct.
  10. There could be file permissions problem on the /sites/files directory so please refer here.
  11. Once successfully installed, for security make your settings.php file unwritable or in other words 0444.
  12. Go to http://test.drupal.com/admin/reports/status for more problems. Look at the logs.
  13. The folder sites/test.drupal.com should be 0755.
  14. There is a 'drupal trusted host issue' which can be solved by adding the below lines on the 'settings.php' file. Sometimes I wonder why drupal doesn't do this for us.
    $settings['trusted_host_patterns'] = [
    '^test\.drupal\.com$',
    ];

Customise it


 

web security linux ubuntu GIT svn Raspberry apache mysql php drupal cake symfony javascript Ajax css