I have a multisite installation running in a sub-directory on the server - purely for the reason that it has become my MO to develop a new site for a client in a "WordPress" directory while their old site is live, and then when it is ready, I change the index.php
and .htaccess
files and voila, the site is live.
For the first time I have a multisite (sub-directory not sub-domain) in its own folder (not in the root) and now the process is different to what I was used to.
I have googled extensively and found info on the modifications to the .htaccess
file - but I get "Error establishing a database connection" error when trying to access the root on my browser. Root.com/wordpress/
still works perfectly.
I've amended the .htacccess
file with this code - as per WordPress.org:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress
And I've added the name of the subdirectory into the index.php
file as per making a single site live - but now the establishing connection with the database error.
Could you please help with the next step - I sense I am close!