Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are experiencing an Internal Server Error when trying to access /wp-admin/, which redirects to /en/wp-login.php and results in an error. You need to frequently save the permalinks to access the login page.
Solution:
We recommend testing the workaround provided in the WPML documentation. First, ensure you back up your database. Then, follow the instructions on handling the .htaccess file when it gets overwritten with the language folder on a WPML website. You can find the detailed steps here: WPML .htaccess workaround.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket with us for further assistance.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 0 voices.

Last updated by Andrey 3 months, 2 weeks ago.

Assisted by: Andrey.

Author Posts
April 15, 2025 at 8:20 pm #16935969

saverioT

Background of the issue:
I have set the default locale of the website to English, having folders also for the default one (/en/). I am trying to log in to WordPress admin.
I need to save again the permalinks in order to be able to make the login page working, but it is very annoying because if I log out I cannot log in...

Symptoms:
Internal Server Error when trying to access /wp-admin/, which redirects to /en/wp-login.php and results in an error.

Questions:
How to fix it properly?
Why am I getting an Internal Server Error when trying to log in to WordPress admin?
Why does /wp-admin/ redirect to /en/wp-login.php and result in an error?

April 15, 2025 at 9:26 pm #16936185

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Please test the workaround below and let me know if it helps: https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

Before making any changes, please ensure that you back up your database first.

April 15, 2025 at 9:46 pm #16936208

saverioT

Hi, thank you for your quick response.
I have already applied that fix time ago, but the issue still appears randomly.

April 16, 2025 at 1:21 pm #16939131

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

Please double-check to see if the fix is still in place. It's possible that the fix was added to the parent theme and that the theme has since been updated.

If the fix is still present and you are still experiencing an Internal Server Error, you need to activate WordPress debugging to identify the specific error occurring at that moment.

You can do this by adding a few lines to your site's wp-config.php file. Once error logging is enabled, you will be able to see the actual problem.

To enable it, open your wp-config.php file and look for define('WP_DEBUG', false);. Change it to:

define('WP_DEBUG', true);

To enable the error logging to a file on the server, you need to add yet one more similar line:

define( 'WP_DEBUG_LOG', true );

The errors will be saved to a debug.log file inside the /wp-content/directory.

https://wpml.org/documentation/support/debugging-wpml/

Let me know what you see after the debug mode has been enabled.