Support » Fixing WordPress » WP installed in subdomain and subfolder is down after 4.8 update

  • Resolved felipelungov

    (@felipelungov)


    I have a WP installed in http://dev1.aleconomico.org.br/loja/

    As you can see, it is still in development and will be moved to http://aleconomico.org.br/loja/ once it is all set up. It was working fine until June 11th, and I can’t really tell what date exactly it was updated to 4.8.

    The thing is that today it’s returning a 500 Internal Server Error, both frontend and backend. Things I know or tried are:

    1. The main site is on 4.8 and is running fine. It has a different theme and different plugins.

    2. I tried changing the plugin directory name as to deactivate them and the error persisted.

    3. I tried changing the theme directory name (the one specific to the theme installed) and the error persisted.

    4. I tried increasing the memory limit both uploading a php.ini file and defining WP_MEMORY_LIMIT and the error persisted.

    5. I tried adding an .htaccess file (unmodified WP default commands) to the root of the subdomain directory, and the error persisted.

    6. I tried renaming the .htaccess file in the /loja/ subdirectory (as to hide it), and the 500 error was fixed. However, the page was loaded all messy with elements spread out across the entire page. This is understandable since WP could no longer know that the installation was in the /loja/ directory. So this is not a permanent fix.

    7. The error_log files (in both /loja/ and /loja/wp-admin/) do not have recorded errors from when the 500 error is returned, but I learned that some plugins are using deprecated functions and notices were recorded, particularly “Automatically populating $HTTP_RAW_POST_DATA is deprecated” until June 11th.

    So this is all I know. My main suspicions are that (a) something in 4.8 was changed in the way subdirectory and/or subdomain installations work, or (b) $HTTP_RAW_POST_DATA was finally removed, although that shouldn’t return a 500 error I believe.

    I would greatly appreciate any help, as I don’t know where else to look.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I forgot to mention that the main site and the dev1 site both run on the same server.

    The 500 error is caused by your .htaccess. Show us the content. You probably have a syntax error.

    Sure, here it is:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /loja/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /loja/index.php [L]
    </IfModule>
    # END WordPress
    
    # php -- BEGIN cPanel-generated handler, do not edit
    # This domain inherits the “PHP” package.
    # php -- END cPanel-generated handler, do not edit

    I followed these instructions:

    http://liquidbook.com/2014/08/installing-second-wordpress-instance-subfolder/

    I copied and pasted your .htaccess. This is the line that has a problem. There is a problem with your dash. Rewrite the entire line again manually. Backup your .htaccess first.

    
    RewriteRule ^index\.php$ – [L]
    

    Thanks for spotting that! The dash really was wrong, but it wasn’t all. I changed it to RewriteRule ^index\.php$ - [L] and it still gives me the error. I typed it manually, then I copied and pasted from here:

    https://codex.wordpress.org/htaccess

    Any more clues?

    I just did a complete reinstall of WP 4.7.5 (except for wp-content) and the error is still showing. Then I restored the .htaccess from when it was working with no success.

    So I guess it has nothing to do with WP or the update. I’m trying to understand with the host provider if any of the system files changed. When we find out what happened, I’ll mark this issue as closed.

    Thanks @jkhongusc for your help anyways!

    IMO, it is a configuration issue but I do not understand your configurations. You should look at this configuration documentation – https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    You can install WP in a subdirectory AND run out of that subdirectory, e.g. http://domain.com/wordpress

    Or you can install WP in a subdirectory, but run out of root, e.g. http://domain.com/

    I recommend installing and running out of root though. It makes things easier =)

    I decided to remove all the files and reinstalled WordPress. There is actually another WP install in the root, that’s why I need a second one in the subdirectory.

    Then I found out that there was a cPanel misconfiguration, and that is what was causing the problem. So it had nothing to do with WP, just happened to happen around an update.

    I’m marking as resolved. Thanks again, @jkhongusc!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP installed in subdomain and subfolder is down after 4.8 update’ is closed to new replies.