Title: 404 Error | WordPress Multisite + nginx + php-fpm
Last modified: December 7, 2020

---

# 404 Error | WordPress Multisite + nginx + php-fpm

 *  Resolved Anonymous User 15141300
 * (@anonymized-15141300)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/404-error-wordpress-multisite-nginx-php-fpm/)
 * 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](https://gist.github.com/alexgarciab/cad0049697705e2bf94e75e86ec2f144)
 * Anyone can help me out? Thanks

Viewing 1 replies (of 1 total)

 *  Moderator [Yui](https://wordpress.org/support/users/fierevere/)
 * (@fierevere)
 * 永子
 * [5 years, 6 months ago](https://wordpress.org/support/topic/404-error-wordpress-multisite-nginx-php-fpm/#post-13756743)
 * @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.

## Tags

 * [multisite](https://wordpress.org/support/topic-tag/multisite/)
 * [nginx](https://wordpress.org/support/topic-tag/nginx/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 1 reply
 * 2 participants
 * Last reply from: [Yui](https://wordpress.org/support/users/fierevere/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/404-error-wordpress-multisite-nginx-php-fpm/#post-13756743)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
