Have you ever had a WordPress site, only to find out that you want to move the entire site to a new webserver. You can then of course use the Export and Import tool found in WordPress to do so, and it works great. There is only a slight problem, and that is the image files.
Because, as you do a post export and import to a new server, you import the posts with all the original data, meaning that the image links will all remain pointing in the direction of the old server. So, if you delete all files on the old server, and the entire website closes down, then all those links and images will suddenly stop to work, and that is a catastrophe. So, how can you easily and simply export your old WordPress site, import it to your new WordPress installation, and then make sure all images are moved to the new server and all image links are updated? Big question, huh?
Import WordPress installation with image files
Unfortunately there is no super easy way of doing this, but the first step is of course to export your data from the former WordPress installation to the new installation. After you have done so you open your new WordPress installation and import the data with attachments.
And now comes to funny part. Use a FTP manager to download all image files from the /wp-content/uploads/ directory. Download all files and then upload them in the /wp-content/uploads directory on the new server.
The last part is then to update all links, and this can best be done using the search and replace tool. Download the plugin and do first a search for the address of your former website address. Let us say that the former address was www.getitgoing.com and the address of your new site it www.iamstrongandhealthy.com. Now you simply tell the plugin to change all occasions of getitgoing.com in your database to iamstrongandhealty.com. It is worth doing a database backup before doing this, because if you type something wrong it can hurt you a lot, and it can be very hard to fix it. So do a backup first, and after that change the address using Search and Replace.
After these steps you are ready to go, and you have successfully export and imported your WordPress site, including with images and with updated image URLs.
Have this article helped you? Have you got any questions? Please write a comment and let me know!