{"id":312,"date":"2010-06-24T22:45:00","date_gmt":"2010-06-24T22:45:00","guid":{"rendered":"http:\/\/www.dgen.net\/blog\/?p=312"},"modified":"2012-01-07T02:08:54","modified_gmt":"2012-01-07T02:08:54","slug":"fixing-paths-when-moving-wordpress","status":"publish","type":"post","link":"https:\/\/dgen.net\/0\/2010\/06\/24\/fixing-paths-when-moving-wordpress\/","title":{"rendered":"Fixing paths when moving wordpress"},"content":{"rendered":"<p>Keywords: WordPress, HostPapa, managed hosting, image upload, fix, migration<\/p>\n<p>I recently moved a friend&#8217;s blog to a managed (virtual) hosting solution (<a href=\"http:\/\/www.hostpapa.com\/\">hostPapa<\/a> in this case) and it all worked fine apart from the fact they couldn&#8217;t upload images via the wordpress UI.<\/p>\n<p>In the WP-Admin site, if went to edit a page,  then tried to upload an image, you got (for example);<\/p>\n<blockquote><p><span> &#8220;Unable to create directory  \/public_html\/wp-content\/uploads\/2010\/06. Is its parent directory  writable by the server?&#8221;<\/span><\/p><\/blockquote>\n<p><span>After chasing around the houses, and annoying HostPapa\u00a0 &#8211; who claimed that they have a slightly different ruleset around chmod (for example, they don&#8217;t allow 777 even though you can set it in their UI).<\/span><\/p>\n<p><span>I found the fix to this  issue was to edit a field in the WordPress database as follows<\/span><\/p>\n<p>Table: &#8220;wp_options&#8221;<br \/>\nEntry: &#8220;upload_path&#8221;<\/p>\n<p>change from<br \/>\n&#8220;\/public_html\/wp-content\/uploads&#8221;<br \/>\nto<br \/>\n&#8220;\/home\/&lt;username&gt;\/public_html\/wp-content\/uploads&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Keywords: WordPress, HostPapa, managed hosting, image upload, fix, migration I recently moved a friend&#8217;s blog to a managed (virtual) hosting solution (hostPapa in this case) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-312","post","type-post","status-publish","format-standard","hentry","category-stuff"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pfJFK3-52","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/posts\/312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/comments?post=312"}],"version-history":[{"count":4,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"predecessor-version":[{"id":315,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/posts\/312\/revisions\/315"}],"wp:attachment":[{"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}