Home / Questions / Why does WordPress say it cannot write the .htaccess file?

Why does WordPress say it cannot write the .htaccess file?

WordPress saves permalink rules to .htaccess. A read-only file or a wrong owner stops the save, so set the file to writable and check the owner.

When you save permalinks, WordPress writes the rules to .htaccess. If the file is read-only, WordPress shows a message that it could not write the file.

Fix it

  1. Set .htaccess to 644, so the owner can write it.
  2. Check that the file belongs to the web user on the server. Ask your host if you cannot tell.
  3. If you cannot change the file, add the rules by hand, after you copy the default rules from the WordPress documentation.

Keep a copy of the working file before you edit it. For help, contact us.

Ready to act on this?

Get a written review of your site, or send us your question and we will reply within 24 hours.

Related services

Not sure where your site stands?

Send us the details and we will reply within 24 hours with a clear next step.