Steps of Drupal 8 site deployment from localhost to webserver (Linux or centos)
Steps:
1) Empty all cache,
search, sessions table.
2) Take export or dump
of database
3) Copy your source code
to your webserver
4) Give permission 755
to your current folder 644 to your .htaccess file(.htaccess owner should be
apache).
6) Import your database
to mysql
7) Check database
configuration in settings.php(sites/default/) and update it if needed.
9) Give 777 permission
to files folder(sites/default/files).
10) login to your site
with admin credentials and clear the cache or you can clear it via drush
command.
Notes :
If sites css is not loading properly:
- Add temp. path in settings.php
- $config['system.file']['path']['temporary'] = '<your
temp location path>';
If you are getting forbidden access issue:
- Go to apache configuration and check mod_rewrite is enabled or not.
- If mod_rewrite is enabled then check mod_security2 is enabled or not.
- If mod_security2 is enabled then disabled it and try again.