WordPress Multisite 404 error on posts and subsites

后端 未结 2 781
你的背包
你的背包 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 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

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

    THE ISSUE WAS

    /etc/apache2/apache2.conf

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

    AllowOverride None to All

    
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted 
    
    

提交回复
热议问题