WordPress Multisite 404 error on posts and subsites

后端 未结 2 780
你的背包
你的背包 2021-01-16 06:32

I have installed WordPress multisite and my main site is working but the posts and subsite going to 404 I searched a lot and no luck. my Wordpress is configured in the subdi

相关标签:
2条回答
  • 2021-01-16 06:54

    Fixed this issue by changing php configuration of my server

    it was serving php by nginx i changed it to apache and my issue gone.

    0 讨论(0)
  • 2021-01-16 07:03

    So I struggled and struggled with this error I'd moved an existing working server to a new Ubuntu 16.xxx server and it all went t***ts up.

    Wordpress - MultiSite - SubDomain install Main site working correctly like - www.domain.com

    Subdomain sites like testing.domain.com OR www.anotherdomain.com

    • would work correctly but only on their default home page
    • would work correctly on pages and posts if using post ID rather than pretty permalinks.

    .htaccess file was all according to the recommended settings wp-config.php all set up similarly

    Sites vhost config files for subdomains configured correctly

    <VirtualHost *:80>
            DocumentRoot /var/www/html/web04
            ServerName subsite.domain.uk
            ServerAlias www.subsite.domain.uk subsite.web04.domain.uk
    
      ServerAdmin webmaster@domain.uk
    
        <Directory "/websites/www/html/web04">
                order allow,deny
                Allow from all
                AllowOverride All
                Options -Indexes +FollowSymlinks
        </Directory>
    
        LogLevel debug rewrite:trace8
    
        ErrorLog ${APACHE_LOG_DIR}/subsite-error.log
        CustomLog ${APACHE_LOG_DIR}/subsite-access.log combined
    
    </VirtualHost>
    

    THE ISSUE WAS

    /etc/apache2/apache2.conf

    MAKE SURE THAT THE FOLLOWING LINES ARE CORRECT AND CHANGE THE DEFAULT OF

    AllowOverride None to All

    <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted 
    </Directory>
    
    0 讨论(0)
提交回复
热议问题