Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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,

Dan

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
1  
@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
add comment

2 Answers

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

require('./wp-blog-header.php');

to be

require('./subdir/wp-blog-header.php');

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

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.