How to move your WordPress blog to a new location

Think you want to move your WordPress to a new server or to a different location on your server.You will think that you want to reinstall.No…You don’t need to reinstall.You can do it following methods.

Moving to a New Server

If you want to move your WordPress from one server to another with images,files and databases then firstly you want to backup your WordPress.

Keeping your Domain Name & URLs

If you want to move your domain without changing the site URLs , you can do it very simply..Here are options to do it.

  • You can move your files and database by copying when the database and URL are same.
  • Edit wp-config.php to have the correct values when your database name or user change.
  • You must change siteurl and home in the database table wp-options when you want to test before you switch.
  • If you have permalinks setup,you must disable .htaccess and reconfigure permalinks.

Change your Domain Name and URLs

Think you want to change your website URL to you need to follow the following methods to do it.

  • Download existing site files on your website.
  • Go to the MySQL and export your database.
  • Move your site backed up files into a new folder.
  • Go to Settings>>General on your site and change the URLs that you want.
  • Save the Settings.
  • Download your site files again and export the database again.
  • Edit wp-config.php with your new MySQL database name,user and password and upload all files.
  • Import the database on the new server.

When you change your domain name or URLs but still there remaining your old domain name or location.This can be a problem when your links display.This call serialization. Data serialization mean some themes and widgets store values with the length of your URL marked.To prevent from this problem,the options are given below.

If you can access your WP Admin Dashboard,

  • Use the Velvet Blues Update URLs.
  • Use the Better Search Replace.
  • Use WP-CLI’s search – replace (If you have installed WP-CLI)
  • Use Search and Replace for WordPress Database Script (Note : Use this option if your database administration is comfortable.)

Moving Directories on Your Existing Server

If you want to move your WordPress to one location to another location on the same server,here are some steps to do it simply.

  1. Create a new location.
  2. To create a new location there are two ways to do it,
  • Create a new directory to move move your WordPress core files.
  • When you move your WordPress site to the root directory,make sure your index.php, .htaccess and other all files are backed up.Because you have to copy those things over the backed up and move to the root directory.
  1. Go to your site

  2. Then go to the Administration>>Settings>>General

  3. Change the address to your new location in the WordPress Address URL box.

  4. Change your public site address to the new location in the Site Address URL box

  5. Save changes that you have made.

  6. Don’t try to view your site at this moment.

  7. Now,move your WordPress core files to the new location.

  8. Then,now try to login to your

  9. Go to the Administration>>Settings>>Permalinks and update your permalinks to your .htaccess file when              you are using permalinks.

12.You must be update your existing image/media/links with the new location.Velvet Blues Update URLs ,Better           Search Replace plugins ,WP-CLI’s Search Replace will help you to do task very easily.You can upload your                 database manually or by using database updating tool Search and Replace Database Script(This tool used by           well experienced developers).

  1. Because of your ISP your permissions may have changed.Look at your files which are “0000” permissions and             change those files back to “0644”.
  2. Go to Appearance >>Menus to update your theme supports menus,links in your home page.

  3. Sometimes your server will popup a error message in MAMP software.To avoid this you will have to restart                  your server.

Note: Before move your files set the URI locations.

If You Forget to Change The Location

Think you have moved files but you forget to change the locations.Like this situations you have two methods to fix this.

  • If you moved old files to new before changing URIs (/path/to/old -> /path/to/new)……………………………….
  • You can easily fix problem when you have forgot to change the WordPress Address.Go to your site’s database and go to wp-options table.Change there option_value field to correct value.


p style=”text-align: center;”>option_name=’siteurl’ / option_name=’home’

If You Forget to changed Your WordPress Site URL

  •  When you forget to changed the URIs before changing the site URL ,you can fix it with login to your wp-login.php
  • Search above line and after that enter following lines to it.
  • Then test your site does it work correctly or not.

How to Mange Your Old Site

Shutdown Your Old Site

  • From your old site download a copy to your hard drive that consists main WordPress files .Edit your wp-config.php file with matching to your new site.
  • Login to your old site and go to Administration >>Settings>>General and change there URL to your new site URL.
  • Now log into your server and go to phpMyAdmin.Then export files and upload to the server that your new database ,WordPress core files.

How to Keep Your Site Running

Firstly you must backup your old site’s database before do anything.

Activate Your New Site

  • Download WordPress installation to your hard drive and name it properly.
  • Then download your database .
  • Go to your old site and change your URL like we did above.
  • Then download again your WordPress installation to your hard drive and name it properly to indicate old one and new one.
  • Download database again and upload that database to your new server.(Make sure that you use the same database name and same user login).When you used different database name or user then you will have to change your wp-config.php in your new site’s installation folder.

Note: You should upload your old site’s database from local computer to the server.

To make copies of posts,data,permalinks and etc,here are some instructions to do it.

  • Install a new WordPress site and go back to the old site’s Mange>>Export and select ‘all’ in Restrict Author.
  • Then click on the Download Export File and go back to your new site’s Manage>>Import and choose WordPress.
  • Then select the file that you want to export and click on Upload File and then import.
  • After that you will go to a new page and that will show you to Assign Authors.
  • Finally ,click on Submit and at the end click on Have Fun.

You may also like...

Popular Posts

Leave a Reply