How Do I Manually Move My WordPress Site?
Moving a WordPress site is a pretty simple process, but there are a few things you need to keep in mind. First, make a backup of your site before you start anything. Then, navigate to your site’s root directory (where the files are stored on your server), and use the following commands to move your site:
1. cd /var/www/
2. mv wp-config.php wp-config.php.backup
3. mv themes/your-theme/wp-content/themes/
4. mv plugins/your-plugin/wp-content/plugins/
5. mv images/your-image/
6. mv media/your-video/
7. mv themes/your-theme/
8. mv plugins/your-plugin/
9.
mv images/your-image/
10. mv media/your-video/
11. rm -rf wp-content
12. rm -rf themes/your-theme
13. rm -rf plugins/your-plugin/
14. rm -rf images/your-image/
15. rm -rf media/your-video/
16. ln -s /var/www/wp-content/themes/your-theme/ /var/www/themes/your-theme/
17. ln -s /var/www/wp-content/plugins/your-plugin/ /var/www/plugins/your-plugin/
18. ln -s /var/www/images/your-image/ /var/www/media/your-video/
19. chown -R www-data:www-data /var/www/
20. exit.
Once you’ve moved your site, you’ll need to update the database tables to reflect the new locations. To do this, use the following command:
1. mysql -u root -p
2. UPDATE wp_options SET option_value=’new_location’ WHERE option_name=’option_name';
3. mysql -u root -p
4.
DROP TABLE IF EXISTS wp_options;
5. mysql -u root -p
6. FLUSH PRIVILEGES;
7.
Finally, you’ll need to update the site’s DNS records. nslookup your-domain.com
2. type A
3.
set type=A
4. set query=
5. set results=
6. print results.
If all goes well, your site will now be located at the new location and all of the data will have been moved across without any issues. If you run into any problems, be sure to take a look at the documentation for the WordPress migration plugin you’re using, as it may have some helpful tips.