• Resolved Anonymous User 15141300

    (@anonymized-15141300)


    I am getting 404 Errors on my WordPress Multisite installation. It is a path based multisite (/en/, /es/ etc.). It is under nginx + php-fpm. I have properly configured the wp-config.php file with the following lines:

    define( 'WP_ALLOW_MULTISITE', true );
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    define('DOMAIN_CURRENT_SITE', 'website.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    define( 'WP_DEFAULT_THEME', 'theme' );

    And I have added the following rules to the nginx vhost server block:

    if (!-e $request_filename) {
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    rewrite ^(/[^/]+)?(/wp-.*) $2 last;
    rewrite ^(/[^/]+)?(/.*\.php) $2 last;
    }

    The curious thing is that this is a site being migrated from one server to another. On the first server, it worked, on the second server, it does not work.

    I am guessing, it is something related with the nginx config. Here is the full nginx .stpl file: https://gist.github.com/alexgarciab/cad0049697705e2bf94e75e86ec2f144

    Anyone can help me out? Thanks

Viewing 1 replies (of 1 total)
  • Moderator Yui

    (@fierevere)

    永子

    @agb58
    There is no reason to delete this thread, but writing a solution you have found will probably help someone else with similar issue.

    I have realized it was a PHP version problem

    Its a confirmed problem with new PHP 8 and older WP,
    WP below 5.6 is not yet ready for PHP8 and even 5.6 may have issues, as well as many plugins and themes.

Viewing 1 replies (of 1 total)
  • The topic ‘404 Error | WordPress Multisite + nginx + php-fpm’ is closed to new replies.