i’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 – uploads were stuck at 100%.
i’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:
while ( '.' != $target_parent && ! is_dir( $target_parent ) ) { $target_parent = dirname( $target_parent ); error_log("wp_mkdir_p $target_parent "); }
and only then i realized that i did not adjust the row with option_name=”upload_path” in the wp_options mysql table. after changing that all started to work fine again.