Plugin update problem after moving blog on hosting server
-
I just took over a blog from a previous webmaster that was developed in a subdirectory called ‘blog’ on the hosting server, then moved to the root directory. The site is working fine and there don’t seem to be any links to the /blog directory in the database for the site except as explained below. The WordPress Address (URL) and Site Address (URL) both point to the root directory for the site.
FYI, apparently because the site is hosted by a reseller, I have to log into the ftp server to update plugins after I hit the install button. Don’t know if this is relevant, but wanted to give all the info I could.
After I renamed the /blog directory I get the error below when I try to install a new plugin. The plugin for the example below, chosen at random, was myRepono WordPress Backup Plugin, but it happens when I try to install any new plugin.
Warning: touch() [function.touch]: Unable to create file /home/xxxxx/domains/xxxxxxxxx.com/public_html/blog/wp-content/uploads/myrepono-wordpress-backup-plugin.tmp because No such file or directory in /home/xxxxx/domains/xxxxxxxxx.com/public_html/wp-admin/includes/file.php on line 179
Warning: unlink(/home/xxxxx/domains/xxxxxxxxx.com/public_html/blog/wp-content/uploads/myrepono-wordpress-backup-plugin.tmp) [function.unlink]: No such file or directory in /home/xxxxx/domains/xxxxxxxxx.com/public_html/wp-admin/includes/file.php on line 493
Download failed. Destination directory for file streaming does not exist or is not writable.
This is the function in file.php returning the error at line 179. The specific command is touch($filename);
function wp_tempnam($filename = '', $dir = '') { if ( empty($dir) ) $dir = get_temp_dir(); $filename = basename($filename); if ( empty($filename) ) $filename = time(); $filename = preg_replace('|\..*$|', '.tmp', $filename); $filename = $dir . wp_unique_filename($dir, $filename); <strong>touch($filename);</strong> return $filename; }
This is the function in file.php returning the error at line 493. The specific command is unlink( $tmpfname );
function download_url( $url, $timeout = 300 ) { //WARNING: The file is not automatically deleted, The script must unlink() the file. if ( ! $url ) return new WP_Error('http_no_url', __('Invalid URL Provided.')); $tmpfname = wp_tempnam($url); if ( ! $tmpfname ) return new WP_Error('http_no_file', __('Could not create Temporary file.')); $response = wp_remote_get( $url, array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname ) ); if ( is_wp_error( $response ) ) { <strong>unlink( $tmpfname );</strong> return $response; } if ( 200 != wp_remote_retrieve_response_code( $response ) ){ unlink( $tmpfname ); return new WP_Error( 'http_404', trim( wp_remote_retrieve_response_message( $response ) ) ); } return $tmpfname; }
[Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
I’ve done a query on the sql database for the site and can’t find the /blog subdirectory in it anywhere. I could just leave the subdirectory name the same, but I would prefer to rename or delete it for security reasons. I also want to understand the cause for when I need to move another site in the future. Thank you.
- The topic ‘Plugin update problem after moving blog on hosting server’ is closed to new replies.