- Assuming we want to move from /demo/foo/ to /demo/bar
- Copy /demo/foo/ to /demo/bar
- Make ESPECIALLY sure that the .htaccess file in foo has been copied to bar, because
cp
might not copy it in some cases. - Open the .htaccess file and change RewriteBase to /demo/bar.
- Change the last
RewriteRule
toRewriteRule . /demo/bar/index.php [L]
- Save & exit htaccess.
- You should now get a 404 page when you open the website.
- Go to your database and open wp_options table, you will find 2 rows containing the website url, change them accordingly.
- You should be done here, but in case you get broken links, find a way to find all occurrences of the old URL in yiur database and replace them with the new URL.
Created
June 23, 2019 12:16
-
-
Save adnanhz/9b456b9b22034f67062aa626ccdaae25 to your computer and use it in GitHub Desktop.
Relocating Wordpress to a new folder on a server
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment