• 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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator t-p

    (@t-p)

    – To rule out any theme-specific issue, try switching to the unedited default theme for a moment using the WP dashboard. If you don’t have access to your admin area, you can switch to the default theme by renaming your current theme’s folder in wp-content/themes and adding “-old” to the end of the folder name using via FTP or SFTP or whatever file management application your host provides.

    Thread Starter beautypeakwebdesign

    (@beautypeakwebdesign)

    Thanks for that, Tara, but it did not help. I activated the 2012 theme, renamed blog folder to blogx, tried to install a new plugin and got the same error.

    Moderator t-p

    (@t-p)

    – have you discussed the issue with your host?
    – also try checking your site’s error logs for a more specific error message. If you need help locating them, ask your hosting provider to help you with that.

    Thread Starter beautypeakwebdesign

    (@beautypeakwebdesign)

    I may do that, or just not bother since it is a non-issue as long as I don’t rename the folder. I am doing this work pro-bono so its not worth turning into a career. It just seems like there must be something buried in one of the WordPress config files or database that is causing it to look into the folder where WP was originally installed.

    Moderator t-p

    (@t-p)

    this codex has lots of good info: http://codex.wordpress.org/Moving_WordPress

    Thread Starter beautypeakwebdesign

    (@beautypeakwebdesign)

    Thanks for that tip. I have moved a number of WordPress sites in the past couple years, crashed not a few and always recovered. I am beginning to think this is one of those weird ones that is not worth the trouble, but I will review the link you sent and TY for that.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin update problem after moving blog on hosting server’ is closed to new replies.