How To: move WordPress into a subfolder

How To: move WordPress into a subfolder

Problem:

I find that having the WordPress installation inside a folder is the cleanest way to be able to still use your server for other storage purposes. But we dont’t want our permalinks to have the form: http://www.domain.xxx/subfolder/post. Redirecting our domain names to http://www.domain.xxx/subfolder would eliminate the subfolder from the permalinks, but by doing this we have no access to web linking any content outside the wordpress instalation (other than using the direct IP).

Solution:

The solution is pretty simple but the order of things is important to avoid having to change WordPress’s path on the database by hand. So here’s the recipe for (my own, actually) future reference. Obviously you could check out the WordPress Codex, but I find that page has much to information for what I was needing, that is a lot more simple.

1. Log into the admin panel >> Settings >> General and write in:

(the folder you want WordPress in)
WordPress Address (URL): http://www.domain.xxx/subfolder
(the top level domain name you would like to be your webpage)
Site Address (URL): http://www.domain.xxx
[notification type=”notification_warning”]Ignore any error and don’t try to watch your page right now because links are temporarily broken.[/notification]

2.  You should now be quick to copy the entire wordpress installation into your new subfolder.

3. Keep a copy of an index.php on the root of the server with the content:


And voilá

Remember that your domain name should be redirected to the root of the server so that you can have access to everything else in there, but still http://www.domainname.xxx will be pointing to your wordpress site, with all files carefully kept in their own directory.

We’ve been best friends since 1967

Next Article

We’ve been best friends since 1967

No Comments

Cancel