I backed up my existing Wordpress site to work on it locally to create a multi-site network. My goal is not only to leave the existing site as-is, but add a new homepage with its own theme. I am trying to create a multi-site within a sub-folder.
I got it to work with a fresh install of Wordpress however I've run into complications with an existing local site.
Steps I've taken:
I changed the .htcaccess file to:
# BEGIN Wordpress 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] # END WordPress
I've changed the ports from
:8888 & :8889
to:80 & :3306
I've changed the host file within the terminal with the command:
sudo nano /etc/hosts 127.0.0.1 vslocal.com 127.0.0.1 sub.vslocal.com
I performed a search and replace within the database with the new domain for the local site.
I changed the wp-config.php file to include:
define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); define('DOMAIN_CURRENT_SITE', vslocal.com'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
Now I am receiving the "Error establishing a database connection" error. After following different resources I might have confused myself and I'm having trouble with what steps have I missed or done incorrectly. I am running on a Mac OSX Yosemite and using MAMP 2.2. Any help will be a lifesaver! Thanks!