1. Setup new directory and copy across all  old files.

2. Edit functions.php of old site.

Add these two lines to the file, immediately after the initial “<?php” line.


reload admin pages a few times. remove the 2 lines

3. Update URL’s in database tables.

On new site, replace all URL’s in database. Use ‘Better Search replace’ plugin on database with old url to new url (serialised that’s why you need this
plugin) on all tables

4. Redirect old site.



1 Comment on how to move wordpress site to new url on the same server.

  1. Thomas says:

    Hi Wayne, nice blog! Looking for a follow button so I can see all your posts on my WordPress reader on my iPad. Do you have one? Thanks! Also looking for a follow button on your MacintoshHowTo blog but – can’t find one. Thanks. 😀

Leave a Reply