Final steps for moving WordPress site to another server

Ive read many other threads here and also guides as this is my first time moving a WordPress site to another server and I think Ive done everything correct so far but not sure.

So far Ive done the following:

  • Backed up WP files and moved them to public_html of new server and ip

  • Created a new Mysql db along with user and imported the old DB

  • Checked the imported DB in phpmyadmin and everything seems to be
    there Changed wp-config file to the new db details

  • Also defined the site url in wp-config like so:

    define( ‘WP_SITEURL’, ‘http://www.example.com‘ );

Finally Ive changed my local hosts file to the following:

new.ip.here    example.com

when I visit example.com it seems to redirect to www.example.com which I believe should be my site as it is still on the old/current server.

I logged in to WP anyway and did a test post but the post then appeared on the site on the old server which I guess confirms what I said above?

When I run the following ping commands I get these results though

ping example.com - new ip returned
ping www.example.com - old ip returned 

Have I done everything correct so far and if so how can I test the site on the new server if its redirecting me away?

thanks

Read more here: Final steps for moving WordPress site to another server

Leave a Reply

Your email address will not be published. Required fields are marked *