Error establishing a database connection – WordPress Multistage in Sub-Folder
-
Hi all.
I have a website running on my production server which I moved to localhost.
The folder structure is as follow:
localhost/xxx/main – Here are the website files.
I have updates the database by changing all the url’s to be localhost/xxx/main.
My .htaccess looks like this :
RewriteEngine On
RewriteBase /xxx/main/
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]wp-config.php has the following lines added :
/* Multisite */ define('WP_ALLOW_MULTISITE', true); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); define('DOMAIN_CURRENT_SITE', 'localhost'); define('PATH_CURRENT_SITE', '/xxx/main/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); /* That's all, stop editing! Happy blogging. */
The problem I am having now is that I cant establish the connection to the database.
Whenever I set up
define(‘MULTISITE’, false);
the connection with the database is being established just fine.Any ideas please?
Thanks
Dom
- The topic ‘Error establishing a database connection – WordPress Multistage in Sub-Folder’ is closed to new replies.