<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Moving a WordPress Installation from a Sub-Domain to Root

Published on
12,143 Points
5,843 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 13

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

Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Join & Write a Comment

The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month