{"id":2062,"date":"2014-02-17T09:00:36","date_gmt":"2014-02-17T08:00:36","guid":{"rendered":"http:\/\/kudzia.eu\/b\/?p=2062"},"modified":"2014-02-17T09:10:48","modified_gmt":"2014-02-17T08:10:48","slug":"wordpress-hangs-when-uploading-an-image","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2014\/02\/wordpress-hangs-when-uploading-an-image\/","title":{"rendered":"wordpress hangs when uploading an image"},"content":{"rendered":"<p>i&#8217;ve moved my wordpress to a new server few weeks ago. all appeared to work fine but i forgot changing the configuration and providing new upload dir path. result? the media page [ wp-admin\/upload.php ] did not open and apache2 appeared to be hanged using 100% cpu. i could not add any media in the post editor &#8211; uploads were stuck at 100%.<\/p>\n<p>i&#8217;ve spent nearly half an hour adding error_log around the wordpress code before i figured out it was the wp_mkdir_p from wp-includes\/functions.php that hanged in this loop:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nwhile (  '.' != $target_parent  &amp;&amp; ! is_dir( $target_parent ) ) {\r\n $target_parent = dirname( $target_parent );\r\n error_log(&quot;wp_mkdir_p $target_parent &quot;);\r\n}\r\n<\/pre>\n<p>and only then i realized that i did not adjust the row with option_name=&#8221;upload_path&#8221; in the wp_options mysql table. after changing that all started to work fine again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>i&#8217;ve moved my wordpress to a new server few weeks ago. all appeared to work fine but i forgot changing the configuration and providing new upload dir path. result? the media page [ wp-admin\/upload.php ] did not open and apache2 appeared to be hanged using 100% cpu. i could not add any media in the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[79],"class_list":["post-2062","post","type-post","status-publish","format-standard","hentry","category-unimportant","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/2062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=2062"}],"version-history":[{"count":3,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/2062\/revisions"}],"predecessor-version":[{"id":2065,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/2062\/revisions\/2065"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=2062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=2062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=2062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}