InMotion Hosting Support Center

It's easy to move a WordPress site from WordPress.com to a self hosted WordPress install. Or migrate WordPress from one server to another using these simple steps.

Move WordPress site from WordPress.com to self hosted

Using WordPress.com you can export your pages, posts, comments, categories, and tags. Then import this content into a self hosted WordPress install, just worrying about you plugins, themes, or widgets from that point.

Export your WordPress site from WordPress.com

If you already have a site on WordPress.com just follow these steps to export your data:

  1. Log in to your WordPress.com dashboard

    In my example this is: http://JacobIMH.wordpress.com/wp-admin

  2. Hover over Tools, then click on Export
  3. Under Export Option, click on Export
  4. Under Choose what to export, leave All content selected and click on Download Export File
  5. Take note where you download the jacobimh.wordpress.YYYY-MM-DD.xml file to

Create blank WordPress site to import data into

Now that you have your WordPress site data exported to your local computer, you'll need a fresh WordPress install on your server to import that data into.

  1. Either install WordPress with Softaculous, or install WordPress manually
  2. Then login to your WordPress dashboard
  3. Hover over Tools, then click Import
  4. Now click on the last option for WordPress
  5. On the WordPress Importer screen that pops up, click on Install Now
  6. Next click on Activate Plugin & Run Importer
  7. Click on the Choose File button, select the WordPress export you created, then click on Open
  8. Now click on Upload file and import
  9. Under the Import author either type in a new user name you'd like to assign the imported posts to, or beside or assign posts to an existing user click on Select and choose an existing user

    Also under Import Attachments select Download and import file attachments, then click Submit

Finished with WordPress.com migration

You should now have successfully moved your WordPress.com site to its own self hosted WordPress install!

Now you just might want to login to your WordPress dashboard and start adding any Plugins, Themes, or Widgets that you had been using on WordPress.com.

Move WordPress to a new server

If you already have WordPress installed on a server, and would just like to move it to another server this can be accomplished easily as well.

The benefit of doing a full WordPress migration from one server to another is that it brings over everything you've done in WordPress up to this point, including Plugins, Themes, and Widgets.

Download WordPress site content from old server

When migrating a WordPress site to a new server, first save all of the current content from the previous server:

  1. Using FTP, connect to your WordPress site on your old server
  2. Download all files in your document root directory, typically /public_html to your local computer

    Install WordPress to a folder like /wordpress? Just download that folder instead.

Download WordPress database backup

With the WordPress files saved to your computer, next you need a copy of your WordPress database:

  1. You want to export your WordPress database with phpMyAdmin

Create MySQL database on new server for WordPress

Since you've got the WordPress database backed up, the next step is creating a new database to import that into.

  1. Create a MySQL database on the new server

    Take note of the Database name, Database user, and Database password you've set

    In this example here is what I wrote down:

    Database name: example_wrdp1

    Database user: example_wrdp1

    Database pass: myDBpassword

Modify downloaded wp-config.php file with new database

Before uploading your WordPress files to the new server, you need to adjust your wp-config.php file with the new settings.

  1. From the WordPress files you downloaded, open up the wp-config.php file with a text editor
  2. You will want to modify the highlighted code with the new server's database info you took note of:
    /** The name of the database for WordPress */
    define('DB_NAME', 'userna5_wp12');
    
    /** MySQL database username */
    define('DB_USER', 'userna5_wp12');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'FGdgA%#5');
    
    /** MySQL hostname */
    define('DB_HOST', 'mysql.example.com');

    So for our example we end up with:

    /** The name of the database for WordPress */
    define('DB_NAME', 'example_wrdp1');
    
    /** MySQL database username */
    define('DB_USER', 'example_wrdp1');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'myDBpassword');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    It's important to point out that the DB_HOST might have been a hostname previously on your old server. Typically if you're migrating WordPress to a server where they MySQL server and website are on the same server, you can just use localhost to let WordPress know to look locally for the database.

Upload WordPress files to new server

Now that your wp-config.php file is adjusted for the new server, upload all your files there.

  1. Using FTP upload your downloaded WordPress files to the new server

    If you've installed WordPress to a folder like /wordpress, make sure to upload the files there.

Import WordPress database backup to new server

The last step in a WordPress migration to a new server is importing the WordPress database backup to the server

  1. Import your WordPress database using phpMyAdmin

Finished moving WordPress to new server

You should now have successfully migrated your WordPress site from one server to another!

You might want to login to your WordPress dashboard to ensure everything is working now on the new server.

Support Center Login

Social Media Login

   
Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2015-01-04 2:42 pm

Great video and article. I  have an additional question. By mistake I installed all of the wordpress files in the document root of hcp-consulting.org

I would like to move it now to a sub directory in the root. Does this work exactly the same way? How does it work it if it is in the root in a directory called "hcp"  - how do I make it that site visitors can access it by  going to hcp/consulting.org instead of hcp-consulting.org/hcp ?

Thanks for your help and the great instruction you posted

 

Christian Hofer

Staff
25,306 Points
2015-01-05 12:40 pm
Hello Christian,

Thanks for the comments! Moving a WordPress location isn't really all that difficult, but you should definitely take care in making the move. Our tutorial on Moving WordPress will give a good reference point and the steps needed for the move. You can also find a complete article on moving WordPress from one location to another here.

In answer to your last question, the steps for that process are provided by WordPress in their documentation: Giving WordPress its own directory.

I hope this helps to answer your question, please let us know if you require any further assistance.

Regards,
Arnel C.





n/a Points
2015-04-28 1:51 pm

Thanks for the video.  Great tempo and clarity! Made the process much less daunting that all the writeups I've seen.  Couple of questions:

I've read in several places that as a last step before exporting the database and exporting the WP files, you can change the Wordpress URL and Site URL in Settings > General to the new domain and save.  Is that even possible?  You obviously won't have access to the old site any more via the domain, but this in theory would eliminate having to make the URL changes in the new database tables, correct? Also, if I use the same database, name/user/password combination on the new server database, the only thing I would need to change in the wp-config.php file would be the dbHost, correct?

 

Thanks again.

Staff
28,219 Points
2015-04-28 2:29 pm
Hello Chris,

If I followed what you were saying correctly that is how it should work. It is a relatively simple process anyway so if a couple of places need to be revisited that is also fairly easy to adjust.

Kindest Regards,
Scott M

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

4 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!