How do I move my WordPress site from one folder to another?

We often receive support requests where customers have installed WordPress into a subdirectory (e.g. /wp) instead of on the root of their domain.  Luckily, this isn't a problem - there are a few steps to follow to move your site to another folder or the root directory.

Moving the WordPress files

1. Using the cPanel File Manager, remove any files in the root of the domain (be sure not to remove the subfolder containing your WordPress installation)
2. Open the subfolder containing your WordPress files
3. Select all files by clicking 'Select All'
4. Click 'Move File'
5. Enter the path you want to move the files to (for instance "/public_html/wp" would need to simply be "/public_html/" if you want to move your site to the root of your domain)
6. Click 'Move File'.  This will move the WordPress installation.  You now need to update the WordPress database.

Modifying the WordPress database to reference the new location

7. Return to your main cPanel screen and open PHPMyAdmin
8. Select the WordPress database from the left-hand menu (usually contains the letters 'wp' somewhere). You should see all the WordPress tables listed on the right
9. Click 'Export' then 'Go'. This will download a copy of the database to your computer
10. Open the file on your computer using a text editor such as Microsoft Word or WordPad (not Notepad, which can affect line breaks in the database)
11. Perform a find/replace on all occurrences of the old domain name, and replace with the new domain name. For instance: replace with
12. Save the file
13. Return to PHPMyAdmin and select the database again
14. Click 'Check All' at the bottom, then select 'Drop' from the 'With Selected' drop-down list. This will clear your database
15. Click 'Import' and select your edited database file from your computer.  Import the file to complete the process.

Once the steps above have been completed, you may need to perform a hard refresh (e.g. CTRL+F5) of your web page to remove any content cached by your web browser.

Was this answer helpful?

Add to Favourites Add to Favourites      Print this Article Print this Article

Also Read
How can I test or preview my website before switching DNS? (Views: 12181)
Migrations (Views: 5715)
Is my website down? (Views: 2203)
Is Smart Hosting suitable for WordPress? (Views: 2280)
How do I get an SSL certificate for my domain? (Views: 6859)

©  Smart Cloud Hosting UK Ltd - Registered Company Number 9101547
Smart Hosting has been Rated 5 / 5 based on 609 Reviews Stars
Privacy Policy | Terms of Use | Report Abuse /
*Prices Shown Exclude EU VAT - UK VAT Registration Number GB 196 1704 88
From 1st January 2015 there are new VAT rules for EU customers.

Social Media:
Facebook Facebook Facebook

Accepted Payments

Nominet Member