Images missing after moving WordPress folder
I have a few websites running in this server. One of them is the Riverside Crew MCC site my brother runs. I moved it from one folder to the other on my server. When I did a lot of the images no longer worked. It turns out that you need to manually specify the folder that stores images in wordpress. Since I moved all of the blog to a new folder that location no longer existed. So obviously I updated the location in Settings > Miscellaneous (Not Settings > Media as you would expect). However that didn’t work either.
Looking at the links where the images used to be I can see that it still points to the old location. So it looks like when you change that settings it is for any images you are going to upoad. It doesn’t update old links. After a bit of Googling a figured out that you will have to update each link in the database individually. It explains how this is achieved on the WordPress site.
However I found an easier solution. I simply created a shortcut in the old location pointing to the new location. For example I moved the wp-contents/images folder from /var/www/html/site/wp-content/images to /var/www/html/site/blog/wp-content/images. So all I needed to do was create a link in the old location pointing to the new location. Once that was done everything worked fine again. Without having to mess around in the database!
First I recreated the wp-content folder in the old location
mkdir /var/www/html/site/wp-content
Then I changed to this directory
cd /var/www/html/site/wp-content
Then I created the link to the new images folder
ln -s /var/www.html/site/blog/wp-content/images images
And voilá!









What people are saying