.htaccess permissions changes not working on One Click installs



Hi everyone - I’m hoping someone has some insight into this.

I have four WordPress sites on my account that were installed using the One Click install (not the Deluxe version, the regular tweakable one). All good on that front, everything has been working great for years and so on. Still, I’ve had the old ‘if .htaccess were writable, we could update automatically…’ note in the Permalink options for each of them from day one, but didn’t give it much thought since I just updated the rewrite rules manually.

What got me wondering again was that I have the WordFence plugin installed on one of the sites, and it prompted me to configure its Web Application Firewall, which again ran into the ‘.htaccess not writable issue’. So, I checked the .htaccess permissions on the server, and they are all set to 644, but even if I set them to 777 there’s no change.

However, I also have two other WP installs I did manually, and there’s absolutely no issue with writing to .htaccess when set to 644 - in fact, Wordpress behaves as you’d expect according to the permissions setting.

So, my question is, why would .htaccess permissions changes not apply on custom One Click WP installs, which should behave pretty much as if I FTPd the files and created the database manually? I can access and modify everything else, (hence the whole point of a fully customizable installation, as opposed to the ‘Deluxe’ option DH offers), but it’s like there’s a higher level restriction that keeps ignoring the CHMOD values I set on the .htaccess file.

Thanks in advance!


Do you know which user and group owns the .htaccess file? Make sure its owned by the same user and group that owns the rest of your files.


They shouldn’t be any different.

In fact, the one-click doesn’t make the .htaccess, WP does. That is incredibly weird. I peeked at your four WP installs and they look okay to me.

I would actually try deleting (renaming…) the file and seeing if WP can magically re-create it?


Update! I’ve been trying to eliminate other possible factors, and realised that one of the four one-clicks wasn’t actually having the ‘.htaccess not writable’ issue, and what made this one different is that I didn’t set it up with the ‘Site URL’ and ‘WP URL’ being different. In the other three, I had set up index.php and .htaccess in a sub directory (/blog or /site or whatever was set in the admin), which in turn called up wp-blog-header.php from the root. However, I had this set up years/several WP versions ago following instructions on WP.org that I can’t find now, and I’m not sure if it’s still considered the proper way to do it, or if that’s at the root (no pun) of the issue.

Anyway, long story short, as soon as I set the Site URL and WP URL to be the same in the admin panel, lo and behold, no more ‘.htaccess not writable’ issues. The weird thing to me is that there was an .htaccess file in both the sub directory and in the root WP directory, and it’s like WP wouldn’t/couldn’t write to either one, despite permissions being set to 644 on both.

Ultimately, I’m not sure if it’s just me being dumb with the configuration of .htaccess and index.php in the designated site URL sub directory (the sites work fine, so probably not that), or if it’s a bug of some sort with WP

Thanks for taking a look Ipstenu-DH! Now that I know the root of the issue, I might just switch the other three sites to use the same URL for both WP and site, since I can’t even remember why I wanted to address to point to a sub dir in the first place :slight_smile: However, if you have any more insights, I’d be much obliged. Thanks again for looking at the issue.


BLINK Well thats’ weird. Were you doing this trick https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory ?