Keywords: WordPress, HostPapa, managed hosting, image upload, fix, migration
I recently moved a friend’s blog to a managed (virtual) hosting solution (hostPapa in this case) and it all worked fine apart from the fact they couldn’t upload images via the wordpress UI.
In the WP-Admin site, if went to edit a page, then tried to upload an image, you got (for example);
“Unable to create directory /public_html/wp-content/uploads/2010/06. Is its parent directory writable by the server?”
After chasing around the houses, and annoying HostPapa – who claimed that they have a slightly different ruleset around chmod (for example, they don’t allow 777 even though you can set it in their UI).
I found the fix to this issue was to edit a field in the WordPress database as follows
Table: “wp_options”
Entry: “upload_path”
change from
“/public_html/wp-content/uploads”
to
“/home/<username>/public_html/wp-content/uploads”