How to move WordPress to a new server and change the domain

Moving WordPress to a new server or changing the domain name  is usually an easy and straight forward task. Please contact me if you need advice or help on moving your WordPress site to a new server or to a new domain. Usually, you can get a fixed price for the job. Please contact me for a quote.

 

 

How to move WordPress to a new server or a new domain or both.

Manually move WordPress to a new server with a new domain

  • Disable all plugins
  • Create a backup of your database.
  • Create a backup of WordPress.
  • At the menu «Settings» – «General» change to a new domain.
  • Create a new backup of the database and a backup of all the files.
  • Restore the database and the files on the new server.
  • In the file wp-config.php change the name of the database, user and password if needed
  • In .htaccess change to a new domain name if needed
  • If needed add the following to lines of code to you wp-config.php file:
define('WP_SITEURL', 'http://www.example.com');

And this:

define(‘WP_HOME', 'http://www.example.com');

 

 

 

 

Useful links

 

 

 

Migrating WordPress to the new server

Things to do on the new server after the move

  • Log in on the new server
  • Activate your plugins one-by-one. If something bad happens then you will know which plugin that has created the trouble.
  • Change all the links. You can do this directly in the database or use a link checker plugin for WordPress. In the MySQL database go to the value
wp_options

Find the values

site_url

And

home

Change these values to the new domain.

 

 

 

 

Change the traffic from the old domain to then new domain

To avoid losing your ranking on the search engines and losing visitors the most favorable technique is to use a redirect 301 statement in your .htaccess file. Do this:

Open the file on the old server with the name:

.htaccess

Add the following text:

Redirect 301 / http://www.tbt.no

A 301 forward setup will forward all traffic from the old domain name to the new domain name.

 

 

 

How to change the domain name on your WordPress site

Search and replace in the MySQL database

With this plugin can you do a search and replace in the WordPress database to change from the old to the new domain name.

 

 

 

 

Change to a new domain on Google FeedBurner

Remember to change the Google FeedBurner source so your RSS feeds continues to work

 

 

 

 

Twitter, Facebook, Mailchimp or aWeber

Have you connected Facebook,  aWeber and Twitter to your site they will also need an update to the new URL.