When moving a site to a different server, or even when moving it to a different directory on the same server, it is common to experience upload related problems. If you used to be able to upload images via the WordPress backend and after moving your site you start getting errors like the one below, this article might help get this fixed.
"some-image.png" has failed to upload due to an error Unable to create directory uploads/yyyy/mm. Is its parent directory writable by the server?
The problem is that WordPress stores an
upload_path option in the database, namely in the
wp_options table. This
upload_path contains the “absolute path” to where WordPress should store uploaded files. If your site’s location in the server’s file system has changed, which will likely have happened if you moved your site, you will need to update this option directly in your database to reflect the new absolute path to the uploads folder. This can be done using the phpMyAdmin interface available from the ENOISE hosting control panel.
For example, lets say that I have an ENOISE shared hosting package for
mydomain.com and I have a site in a subdirectory at
http://mydomain.com/test-site/. Then I decide to move this site to
http://mydomain.com/blog/. To do this I would simply rename the
test-site folder to
blog. This change will have broken your uploads, so in order to fix this I’d need to:
- Go to my hosting control panel. (Not sure how to? How do I access my hosting control panel?)
- Browse my MySQL databases
- Open the relevant database using phpMyAdmin
- Find the
wp_optionstable and the
upload_pathoption in particular
- Change the value of