• ekgotmilk

    (@ekgotmilk)


    I am switching my WordPress site to a new server and domain.

    Most of it worked fine, but I’m getting an error message at the top of the page and when I try to access wp-admin.

    Warning: fopen(/home/content/b/i/g/bigfoot45640/html/edgewater/wp-content/backup/.htaccess) [function.fopen]: failed to open stream: No such file or directory in /home/content/90/7447590/html/wp-content/plugins/backupwordpress/functions.php on line 377
    Cannot open file (/home/content/b/i/g/bigfoot45640/html/edgewater/wp-content/backup/.htaccess)
    Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/90/7447590/html/wp-content/plugins/backupwordpress/functions.php on line 381
    Cannot write to file (/home/content/b/i/g/bigfoot45640/html/edgewater/wp-content/backup/.htaccess)
    Warning: fclose(): supplied argument is not a valid stream resource in /home/content/90/7447590/html/wp-content/plugins/backupwordpress/functions.php on line 385

    It seems to be looking for the .htaccess on my previous server – bigfoot45640 is the ftp for the old server, not the new one. When I pull up the lines they’re referring to, this is what’s in function.php:

    function bkpwp_security_check() {
    // secure the backup directory with .htaccess
    // deny from all
    $path = get_option(“bkpwppath”);
    if (empty($path)) { return; }
    $filename = $path.”/.htaccess”;
    if (!$handle = fopen($filename, ‘w’)) {
    echo “Cannot open file ($filename)”;
    // should be checked at configuration
    }
    if (fwrite($handle, “deny from all”) === FALSE) {
    echo “Cannot write to file ($filename)”;
    // todo: warn the blog owner
    }
    fclose($handle);
    }
    ?>

    How do I tell it where the proper file is? Also, the wordpressbackup is a plugin I installed on the original site to back up the site for the transfer. It’s not necessarily required right now. But since I can’t access the wp-admin, I can’t deactivate it. Is it possible to just delete the plugin files directly through the FTP or does that screw things up? Just trying to figure out the best way to fix this. Hope it makes sense.

    The site is: https://www.edgewater.org

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter ekgotmilk

    (@ekgotmilk)

    I manually uninstalled the plugin and took care of the problem.

Viewing 1 replies (of 1 total)
  • The topic ‘.htaccess problem in switching WP to new server’ is closed to new replies.