Can't find .htaccess


I’ve been testing the hook: add_rewrite_rule to amend url rewriting.

Just to refresh you on how this hook works. When permalinks is saved then this rewrites the .htaccess file to set the url/slug structure of the site.

I’ve made an amend which has caused a 504 Gateway Timeout error.

I now need to amend the .htaccess file but I cannot find it. I was expecting this in the root of the wp site.

Should I look somewhere else?

Advice appreciated. I’m using nginx at the moment.



Hi Elliot,

nginx doesn’t use .htaccess. .htaccess is only available when using Apache.

As soon as you switch that site to Apache and update the WordPress permalinks you should see it :smiley:

1 Like

Because I have set up the site by default with nginx and then changed to apache, the rewrite via .htaccess did not work for me.

But creating a new site with apache directly does work.