<

Moving a WordPress Installation from a Sub-Domain to Root

Published on
12,104 Points
5,804 Views
3 Endorsements
Last Modified:
Approved
Community Pick
Did you use a default hosting installation of wordpress with the intention of it being your actual site?  Maybe you’ve installed it as a Blog to your current site and recently converted it to be the main site and do away with the old .htm pages.  And the best reason yet – you’re the person hired to revamp an old site for a client that cannot allow down-time or design time during the process interrupting their current site.

Now we have the perfect installation and setup in a sub-domain.  How do we quickly and easily make that a root installation without losing anything or getting into that dreaded PhpMyadmin for crazy attempts at fixing the problem?

It’s not nearly as scary as you think.  All you need is the ftp access, wordpress admin (wp-admin) access (which I’m sure you already have if you’re attempting to do this), and follow three important steps in order.  Key here is “IN ORDER”.

1

First: It’s highly unlikely that you’ll need to worry about overwriting any important files in the root with the exception of the index page.  So first off, in the root, rename the index (any and all – whether they’re .htm, .html, .php, etc.).

2

Next: Log in to the wordpress admin area.  On the menu, choose Settings > General.  You’ll need to change both the wordpress address and the blog address.  Please note that if the current URL in the text field has a trailing slash (/), it’s best to keep this format on the chance that your theme is counting on that trailing slash for any reason. If not, leave it off.

In other words, if the current URL looks like this:
      http://www.mydomain.com/wpblog/
You should enter the root as:
      http://www.mydomain.com/

If it looks like this:
      http://www.mydomain/wpblog
Then enter your root as
      http://www.mydomain.com/wpblog

(Quick reasoning for this, if you have a wordpress code call , such as
      <img src=”<?php bloginfo(‘url’); ?>/images/header.jpg” />
on your images – a simple missing or extra forward slash could make the image not appear.)

Now you can click Save Changes.  Once you do, you will automatically be logged out and it will seem at this point be broken.  No worries, on to the last step.

3

Ftp to the site.  Navigate to the directory for the sub-domain.  Select all or highlight all files in the sub-domain.  Use your mouse to drag all the files up one level to the folder that has the trailing dots (typical ftp view, but yours may look different depending on the ftp software you use.)

This quickly moves all the files to the root.  Now you can log back into the wp-admin from the root instead of the sub-domain and the wordpress site should already be visible by visiting the normal domain name.
All in all, roughly about five to ten minutes to complete depending on your Internet connection speed.  Wasn’t so bad, was it?
3
Comment
Author:Dzynit
1 Comment
 
LVL 12

Expert Comment

by:BMilneSLO
Good stuff Dzynit. Thanks for your contributions! I have a few sites I have to move over, so I'll let you know how it goes.
0

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Join & Write a Comment

This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month