I have a wordpress website in my server in let's say site.com/website. Now let's say i want to change the directory name and rename it to site.com/wordpress. How can I do that? I just change the folder name from File Manager?
- Move your site files from site.com/website to site.com/wordpress (or just rename the folder if you prefer)
- Download the Search/Replace PHP script from here: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ and read the instructions carefully.
- Upload the Search/Replace PHP script to your new site location in a suitable folder eg. site.com/wordpress/srdb
- Run the script by visiting site.com/wordpress/srdb
- Enter the existing site URL in the 'replace' field, and enter the new URL in the 'with' field, making sure there are no mistakes. Then run the search replace using the 'Live Run' button (you can also do a 'Dry Run' first to test).
- Important: Delete the Search/Replace script from your server.
- Edit your site
.htaccessfile to change the line
Note: The reason for using the Search/Replace script above is because it's a lot faster than editing the SQL file manually and it doesn't require you to download the database or delete it. It's an automated process, so less chance of making mistakes when editing the database. And last but, by all means, not least it handles 'serialized' data in the database correctly.
- Move your folder from site.com/website to site.com/wordpress
- download your database (.sql format) from phpmyadmin.
- open .sql file with editor (sublime preferred) and find site.com/website and replace it to site.com/wordpress
- empty your database in the host.
- import modified / downloaded mysql database to phpmyadmin (.sql format)