1

I have a wordpress installation on a site. It was placed inside ~/wp.

I've moved it yesterday to the root folder, ~/. However, a lot of the theme references and images still point out to ~/wp.

Instead of finding all these places(which may be hundreds), I'd like to pass through ~/wp to the root folder. Meaning, when the user goes to http://www.site.com/wp/thing.php , he'll actually be inside ~/thing.php, without changing the url.

Would this be possible with .htaccess changes? and if so, how?

1 Answer 1

1

It's a config setting - in Settings -> General you are given two options, WordPress Address (URL) and Site Address (URL).

You have the former pointing at the directory with the Wordpress installation in it and the latter at the root of your site.

Here's the Codex info on it;

http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

Incidentally, modifying all the files paths is another option of course - you would use the same technique you would use when transferring a Wordpress site from localhost to live, or from a dev server to live. You can look at the second part of my answer in this thread;

How to push wordpress from mamp into hostgator

That interconnectit script is a huge timesaver when moving WP sites.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks, but this scenario describes just changing the site URL and not moving the whole directory. I actually moved the entire directory inside the webserver to the root folder, and would still like some of the files that are linked to /wp to work - even though they are not there anymore
Ah OK - sorry. Have a look at the edited answer then, that's the way to do it - run the find and replace script on the database using the interconnectit script to handle the serialized arrays.
Thanks, I'll have a look at that and try it. However, I'd much prefer just changing the .htaccess file - is this even an option?
Maybe this one would help? stackoverflow.com/questions/6795134/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.