• Romanko

    (@romanko)


    Hi,

    I have recently moved to a new hosting (the site has been down for some years and I have now moved it from the old hosting the a new one manually – files + DB). It seems that the new hosting has a different server file structure.

    The old one was: name/public_html

    the new one is home/name/public_html

    as a result, the wordfence firewall was pointing to a wrong folder and it gave me 403 error. (I get the same error 403, but referencing a different folder now: AH01276: Cannot serve directory /home/name/public_html/wp-content/uploads/: No matching DirectoryIndex)

    Now the hosting support suggested to: You may want to check that the routes for your plugins and other files are set to the right home directory (home/name/)

    in which files are the plugin routes please and how do I set the correct routes? What else needs to be done, when I manually move to new hosting with a different file server structure? Thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Does your site work correctly with the WordFence Firewall plugin disabled?

    If it does, then I’ll recommend you post in the WordFence plugin’s own support forum so its developers and user community can assist you: https://www.ads-software.com/support/plugin/wordfence/

    You may also want to check your wp-config.php file to see if the full file system path is defined there (not by default) and update it.

    Good luck!

    Thread Starter Romanko

    (@romanko)

    I have disabled the wordfence plugin through ftp but i still get the 403 error at the homepage and now a 404 at the hompage.com/wp-admin

    What do you mean by this: You may also want to check your wp-config.php file to see if the full file system path is defined there (not by default) and update it.

    The full system file path – is it ABSPATH or something else?

    I have the following code in the wp-config.php>

    /** Absolute path to the WordPress directory. */
    if ( ! defined( ‘ABSPATH’ ) ) {
    define( ‘ABSPATH’, dirname( FILE ) . ‘/’ );
    }

    /** Sets up WordPress vars and included files. */
    require_once( ABSPATH . ‘wp-settings.php’ );

    Moe

    (@moeo)

    : AH01276: Cannot serve directory /home/name/public_html/wp-content/uploads/: No matching DirectoryIndex

    This error means that there is no index file inside your uploads folder so you can try to create/upload an empty index.php inside it and see if that works.

    Also, Do you have any options flag in your .htaccess file? Whether the main one under public_html or the one in your uploads folder? Probably a security plugin added this for hardening or it’s a global webserver config to prevent directory listing for security reasons.

    Thread Starter Romanko

    (@romanko)

    I created the empty index.php yesterday, no I dont get errors in cpanel, but the website is really unstable still. maybe 1 out of 10 times it loads fine.

    htaccess – is a default one, I deleted it before starting this topic, so it is a new generated one.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘error 403 after changing hostings manually’ is closed to new replies.