I have Backdrop CMS running correctly on my localhost (mac/MAMP) and have completed the site, ready for live deployment.
I used github to git init a repository and add all my files, which I then pushed everything to successfully.
I setup ssh access on my live server (cPanel shared hosting) tested with no problems, git cloned with no problems.
Confirmed PHP and opcache settings were correct.
I then added settings.php file manually (as it was set to be ignored by the .gitignore file).
I did this by creating it empty in cpanel File manager, and editing/pasting the contents as is, from my localhost's Backdrop settings.php file.
I then loaded the URL in my browser for the site mydomain.com/mydirectory
which loaded Backdrop interface, which the following error:
Exception: The configuration directory in settings.php is specified as './files/config_d288997df7e59ac84f89c0935818f46d/active', but this directory is either empty or missing crucial files. Check that the $config_directories variable is correct in settings.php. in _backdrop_bootstrap_configuration() (line 2998 of /home/coastto1/public_html/dylan-bdrop/core/includes/bootstrap.inc).
How do I fix this error?
UPDATE: I noticed my settings.php was referencing a directory that git did not push to cpanel. I realised the defaul .gitignore file has /files directory set to be ignored (where the config directory is stored), so I removed /files from the .gitignore file and then added files directory to git, pushed it to github, and then git pulled it on my cpanel.
Now, when I load my main site url:
mydomain.com/mydirectory
I no longer get the config warning, but instead I just get the stock standard drupal/backdrop error of:
The website encountered an unexpected error. Please try again later.
What next? I am going to check if there is any trusted_host details in settings.php that I need to change.....
UPDATE 2: I cannot find any "trusted_host_patterns" data inside my settings.php file so I guess that is not the problem?
What other settings in my settings.php file would be OK on my localhost, but not OK on my Live/cPanel server?
Hi Klonos,
yes the error was fixed for me, when I replaced this line in my settings.php file:
with this:
NOTE: My password doesn't have open/close brackets in it, just letters and numbers. the "(password)" is just a placeholder for where it should be.