500 Error on the WP-admin page

There is a 500 error showing up on the wp-admin page.
http://projet-uongozi.org/application/wp-admin.php

And the admin page with a slash added showing 404 error:
http://projet-uongozi.org/application/wp-admin.php/

The main issue is that it is not possible to login to a site from the main site of the multisite installation.

  • Michael

    Hi,

    The default way to access your Wordpress admin would be via:
    http://projet-uongozi.org/wp-admin

    This is currently doing a redirect to:
    http://projet-uongozi.org/application/wp-login.php?redirect_to=http%3A%2F%2Fprojet-uongozi.org%2Fwp-admin%2F&reauth=1

    Either check your .HTACCESS file or Wordpress plugins (doing login or redirects). To do this, access your web server via a FTP Client.

    Under your Wordpress plugins folder (normally: /wp-content/plugins/), start by renaming the plugin folder(s) you believe might be affecting it (you could just add -disabled to the end). Wordpress will automatically disable that plugin when it can't find it's original folder name. Refresh the Wordpress Admin page each time to see if disabling that plugin fixed your issue. Rename the plugins back once you have worked out the problem.

    Else if that didn't help, you might wish to make a backup copy of the .HTACCESS file, then just have the basic Wordpress requirements in it for testing:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Or manually remove any redirects for that admin login.

  • daniela

    thank you for such a prompt reply.
    I have followed the suggested procedure yesterday and we both disabled all the plugins and edited the .htaccess file (adding the last rewrite rules block, but not reviewing what comes before..).
    Sadly, no action took the desired effect.
    We also changed the Theme. No effect. :slight_frown:

    Currently I am not able to logout from the site (on one browser), and not able to login (on another browser).
    I suppose there is still something wrong in the .htaccess file.
    The subdomains work well, the problem is just in the main site.

    thank for your help.

  • Katya Tsihotska

    Hi daniela

    Hope you had a wonderful day!

    I was able to find the following issues in your installation:

    1. I've found that .htaccess file was persisted only in site root directory, but according to WordPress subdirectory installation rules, this file should be duplicated into both folders: site root and WordPress installation folder (/application folder in this case). You can find more information about subdirectory WP installation here:
    https://premium.wpmudev.org/blog/install-wordpress-subdirectory/

    2. The main WordPress rewriting rules (see code below) in .htaccess file was paste at the very bottom after all other code.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes|network|login).*) application/$1 [L]
    RewriteRule ^(.*\.php)$ application/$1 [L]
    RewriteRule . index.php [L]
    </IfModule>
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) application/$1 [L]
    RewriteRule ^(.*\.php)$ application/$1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    This order of code gives the lowest priority to this rules (in .htaccess file most prioritized rules should be placed at the top). I would recommend always placed WordPress rules before all other custom rules.

    I've fixed all these issues and now your login page works fine by the following links:
    http://projet-uongozi.org/application/wp-admin/
    http://projet-uongozi.org/application/wp-login.php
    http://projet-uongozi.org/application/login

    If you have any additional questions please let me know and I’ll be happy to help.

    Kind regards,
    Katya

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.