Skip Navigation

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

Problem:
The client is experiencing an issue where the .htaccess file on their WordPress site changes periodically, causing the site to break. This requires resaving permalinks to fix the issue.
Solution:
We have determined that WPML is not the cause of the .htaccess file changes. It is likely due to third-party functionality. We recommend following the steps outlined on our FAQ page to isolate the cause and identify the culprit. You can find the necessary steps here: https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

If this solution does not resolve your issue or seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket for further assistance at WPML support forum.

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 1 reply, has 0 voices.

Last updated by dainiusV-2 2 days, 13 hours ago.

Assisted by: Carlos Rojas.

Author Posts
December 20, 2024 at 9:58 am #16533057

dainiusV-2

Background of the issue:
I am experiencing an issue with my WordPress site at hidden link where the .htaccess file changes every week or few weeks, causing the website to break. I have to resave permalinks to make it work again. The working .htaccess part is: RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index.php$ - [L] RewriteRule ^en/wp-login.php /wp-login.php [QSA,L] RewriteRule ^lt/wp-login.php /wp-login.php [QSA,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] . The not working (changed) .htaccess part is: RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase /en/ RewriteRule ^index.php$ - [L] RewriteRule ^en/wp-login.php /en/wp-login.php [QSA,L] RewriteRule ^lt/wp-login.php /en/wp-login.php [QSA,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /en/index.php [L] . Today I have updated all website and WPML plugins.

Symptoms:
The .htaccess file changes periodically, breaking the website, and requires resaving permalinks to fix.

Questions:
Why does my .htaccess file change periodically?
How can I prevent the .htaccess file from changing and breaking the site?

December 20, 2024 at 10:20 am #16533224

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hello,
Thank you for contacting us

WPML does not cause this issue but is a third-party functionality. Please read this FAQ page and follow the steps described to isolate the cause of the problem and find the culprit: https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

Regards,
Carlos

December 20, 2024 at 10:58 am #16533445

dainiusV-2

Thank you! I'll try this workaround.