WordPress “Upload.php Error” Fix
Software
- WordPress 2.3.3
Server Environment
- Windows 2003 Server
- IIS 6
- PHP 5.2.5
- MySQL 5.0.51a
Problem Description
- Symptom: Clicking on Manage > Uploads kicks users back to admin dashboard
- Cause: All of the links within the upload.php do not reference the file upload.php
» http://www.domain.com/wp-admin/?query=string&for=upload&is=here
Solution
- Open /wp-admin/upload.php file in your favourite editor
- Around line 90 find the following code:
$_href = clean_url( $href); - Replace it with following code:
// begin GamaFX.com upload.php Fix
//ORIGINAL CODE: $_href = clean_url( $href);
$BH_temp = explode(“?”, clean_url( $href ));
$href = ‘upload.php?’ . $BH_temp[1];
$_href = $href;
// end GamaFX.com upload.php Fix - Around line 104 find the following code:
‘base’ => add_query_arg( ‘paged’, ‘%#%’ ), - Replace it with following code:
// begin GamaFX.com upload.php Fix
//ORIGINAL CODE: ‘base’ => add_query_arg( ‘paged’, ‘%#%’ ),
‘base’ => ‘upload.php?style=inline&tab=browse-all&paged=%#%’,
// end GamaFX.com upload.php Fix