Moving multi-site network to local for testing changes (5 posts)

  1. nhiggs
    Posted 4 years ago #

    I have a multi-site network with 3 sub-domains and want to check that some of the recent plugin updates are safe before I put them live.

    However, I am unsure how to get this network running locally.

    I have only just gone to multi-site. Previously when I had a single site I just ftp'd my entire www directory to my hard-drive and then exported my database from within myphpadmin. I then used wamp to get the site going locally. This involved changing the home and site-url to my local address (i.e. from http://www.mysite.com to local.mysite.com).

    That all worked fine, but I am a little concerned that their may be more to it when using multi-site. Anyone got any advice?


  2. You'll want to re-jigger your hosts file on your PC to map those subdomains, but that should pretty much work.

  3. nhiggs
    Posted 4 years ago #

    Of course! Thanks for the link Andrea, I completely missed that you could set the site urls to actually point to my local site!

  4. nhiggs
    Posted 4 years ago #

    Hmmm... Don't think I quite get all the required setup yet.
    When going to my site nearlynewnearyou.co.uk (after making it so that it will use the local version) I get "Error establishing a database connection"

    In my httpd.conf I have:

      DocumentRoot "C:/wamp/www/nearlynewnearyou.co.uk"
      ServerName nearlynewnearyou.co.uk
      ServerAlias *.nearlynewnearyou.co.uk
      ErrorLog "C:/wamp/www/nearlynewnearyou.co.uk/errors/errors.log"

    In my wp-config I have (some details changed as I guessed it would cause a security issue if it were the real data):

    define('DB_NAME', 'mydbname');
    define('DB_USER', 'myusername');
    define('DB_PASSWORD', 'mypassword');
    define('DB_HOST', 'localhost');
    define('WP_HOME', 'http://nearlynewnearyou.co.uk');
    define('WP_SITEURL', 'http://nearlynewnearyou.co.uk');

    and my hosts looks like this:       localhost       nearlynewnearyou.co.uk       warwick.nearlynewnearyou.co.uk       halloween.nearlynewnearyou.co.uk

    myphpadmin shows that I have a database called 'mydname' (matches what is in wp-config) and under privileges of that db a user called 'myusername' with a password of 'mypassword' (both match what is in wp-config) and set to have all privileges.

    I have exported the live site db 'mydbname' and then imported that data back into the local 'mydbname'

    I also ftp'd all the live sites public_html into C:\wamp\www\nearlynewnearyou.co.uk\

    Any idea what I could have done wrong to get that error?

Topic Closed

This topic has been closed to new replies.

About this Topic