Installing WordPress in a Different Directory

in WordPress


I converted one of my websites today with static html pages to WordPress. Problem is I don’t want to lose the URLs on that site since they were already good as is.

Solution, install WordPress on a different directory first – www.domain.com/wp/ then after the content has been transferred/copied, route it to www.domain.com.

1. I installed everything first on www.domain.com/wp/ set the theme and everything else I wanted on this site including the permalinks.

2. Copied the content from the static HTML pages to the corresponding posts in WordPress.

3. After all the sites’ content have been transferred. I changed the Settings > General configuration on the site’s WordPress backend to this:

install wordpress in a different directory

4. Then I moved index.php from www.domain.com/wp to the root, www.domain.com or the directory public_html in this case since this was a WHM/cPanel powered host. Then made the following changes to index.php:

Edited index.php for subdirectory install

5. Moved the .htaccess file to the same place where index.php was and I was done.

I hope this helps, do take note that I arbitrarily chose to name the directory wp, you can install WordPress in the same manner regardless of the folder’s name.

 

{ 1 comment… read it below or add one }

Daniel Petre December 10, 2013 at 8:59 am

Hello,
I am wondering if your monthly archives work with nginx cause mine with /2013/11 like don’t ..
Thanks.

Leave a Comment

Previous post:

Next post: