WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently been re-designed a client's website (whose website is - for example purposes - mywebsite.co.uk)/

I have developed the new website (a heavily modified wordpress install) in a sub-directory (eg: www.mywebsite.co.uk/new).

I would now like for my new website to replace my existing website, and for visitors to find the new site when they visit mywebsite.co.uk. How is this best achieved?

Any help is greatly appreciated,


share|improve this question
i think you have to change the .htaccess file. like ` # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /new/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /new/index.php [L] </IfModule> # END WordPress` Hope its work fine. – Adi May 8 '13 at 11:51
@Adi If you make this into an answer, you can format the code a lot more cleanly. – Pat J May 8 '13 at 13:46
3 answers and no comment. :S Why should I bother giving you an answer? (the 1 rep doesn't help) – Madivad Dec 29 '14 at 11:53

Further to anmari's answer, the WP codex page that describes this in detail. You specifically are looking for "pre-existing subdirectlory".

share|improve this answer

Go to the the Settings page and change the wordpress address and site address to the correct url - http://www.mywebsite.co.uk/new

Alternatively, if you can't change it in the settings, you can do this in the database under the options table.

Wordpress will change your .htaccess file automatically after changing the settings.

share|improve this answer

I'd copy the wp subdirectory index.php to the top level, and edit the line


to be


and of course set the settings for site url and wordpress url to match as suggested above.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.