database connection error for multisite WP in separate folder
-
I’ve been building a multisite WP network in its own folder on a server with an existing HTML website. The software was installed by Softaculus. The idea was that I just remove index.html and it cuts over to WP loveliness.
The WP sites work wonderfully if I access them as
website.com/wordpress
but if I access them as
website.comthen I get a Database Connection error.
The wp-config.php and index.php files are sym-linked into the root folder (to ensure they are the same) and .htaccess has +FollowSymLinks and all the WP rewrite rules are set as per what WP tells me:
Options +FollowSymLinks Options -Indexes RewriteEngine On RewriteBase /wordpress/ 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]I’m assuming the database credentials are fine and the database is not corrupt since with a particular URL everything works brilliantly.
I’ve spent ages trawling the codex and other web sites but none of the advice is doing it for me and much seems inconsistent:
** I’ve tried adding the following to the wp-config.php
define('WP_HOME','http://website.com'); define('WP_SITEURL','http://website.com');** Many instructions talk about changing the address in the Settings/General Site address (URL) but this doesn’t exist at network or site level.
I suspect some interaction between the URL rewrite rules and WP but I don’t understand it deeply enough to figure this out. Any help or tips appreciated.
The topic ‘database connection error for multisite WP in separate folder’ is closed to new replies.