Skip Navigation

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

Problem:
You are experiencing 'Internal Server Error' issues, which seem to be related to the WPML plugin modifying the .htaccess file.
Solution:
1. Refer to the workaround suggested in the following documentation: Why is .htaccess getting overwritten with the language folder on my WPML website?
2. Re-save Permalinks from the Settings >> Permalinks page by pressing the 'Save Changes' button.
3. Clear all sorts of site/server/CDN cache.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your 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 the problem persists, please open a new support ticket.

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 8 replies, has 1 voice.

Last updated by Noman 1 week, 2 days ago.

Assisted by: Noman.

Author Posts
June 18, 2025 at 9:16 am #17145031

adrianA-18

Background of the issue:
I am trying to resolve an issue where the WPML plugin modifies the .htaccess file, causing 'Internal Server Error' problems. The host corrected the .htaccess file from: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase /en/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /en/index.php [L] </IfModule> to: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> and added: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress. They suggested deactivating the plugin to check if the problem persists. The issue can be seen at: hidden link

Symptoms:
I am experiencing 'Internal Server Error' problems, which seem to be related to the WPML plugin's modifications to the .htaccess file.

Questions:
What can we do to prevent the problem from happening again?

June 18, 2025 at 9:41 am #17145424

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thanks for contacting us.

While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.

Please check next related document, you can use workaround suggested there:

- https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

Regards,
Drazen

June 18, 2025 at 10:17 am #17145510

adrianA-18

Hello Drazen,
I tried to add the code on functions.php but I don't find the "Editor" on WordPress to add the code.
Do you know where can I find it?,
Thank you so much,

Captura de pantalla 2025-06-18 a las 12.15.50.png
June 18, 2025 at 11:50 am #17145928

adrianA-18

Hello again Drazen,
Finally I added the code via Code Snippets plugin. I attach you a screenshot.
Could you let me know if I added it correctly?,
Also I deleted the cache,
Do I have to do something more?,
Thanks so much,

Code Snippets.png
June 18, 2025 at 3:11 pm #17147433

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. Yes, the code is added correctly, now, please try to follow the below steps:

1. Re-save Permalinks from the Settings >> Permalinks page by pressing the Save Changes button.

2. Clear all sorts of site/server/CDN cache and it should solve the issue.

Kindly let me know the results,
Thank you

June 18, 2025 at 4:17 pm #17147663

adrianA-18

Hello Noman,
Now the website is working correctly,
the hosting also added this code to htaccess:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Do I also have to do the steps 1 and 2 you just told me?,
I wait to your reply to do it,
Thank you very much,

June 18, 2025 at 5:04 pm #17147842

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Glad to hear the website is working fine now!

Yes, please follow the two suggested steps above, they’ll help ensure everything is fully synced and functioning properly.

Let me know once done or if you need any help,
Thank you

June 18, 2025 at 7:13 pm #17148077

adrianA-18

Hello Noman,
I have just did the two steps above,
Thank you very much,

June 19, 2025 at 8:44 am #17149349

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Great! Thanks for confirming.

If you notice any further issues, feel free to reach out anytime.

Have a great day!