Installation

How do I move WordPress from a subdirectory to the root directory?

April 27th, 2010 | 4 Comments | Filed in Answers to Your Questions, Installation

Q. I’ve installed my website in a subdirectory of our domain, because I didn’t want visitors to see the site until I was finished with our development.

Now I want to have the site show up in the root directory (not in the http://mydomain.com/wordpress directory). How do I do this? I’ve read the information on moving WordPress, and it seems really complicated.

A. The good news is that you DO NOT need to MOVE WordPress in order to have your content display without the subdirectory name. In fact, installing WordPress in a subdirectory is the preferred by many.

Installing WordPress in a subdirectory is good because:

  1. It keeps your root directory clean and tidy (in case you need to add any other PHP applications to your site).
  2. It adds another layer of security by obscuring the location of your WordPress application files. Ideally, you want to name the subdirectory something not too obvious (ie don’t call it wp or WordPress).

So, go ahead and do all of your testing and development with WordPress installed in the subdirectory. When you’re ready to go live, please follow these detailed step-by-step instructions from Bizquarium.com to simply tell WordPress that you’d like all the files to display from the root directory:

Keeping It Simple: Install WordPress in a Subdirectory

Note: If you are using Cforms contact form plugin for WordPress, you will need to tell the Cforms javascript that Cforms is in a subdirectory. You’ll want to do this BEFORE you activate the Cforms plugin. Hyperarts.com created a good post about how to do this:

Telling Cforms JS that WordPress is installed in a subdirectory