You don't have permission to access /wp-admin/post.php on this server. Wordpress

我与影子孤独终老i 提交于 2019-12-01 13:21:14

Ok, I have to edit the answer, because despite everything worked fine, the problem appeared again. So, this time I dug deeper only to find out, that the problem were laying in my mod secure conf, so I had to set SecRuleEngine from On to DetectionOnly, and now the issue is gone. Previously it was detecting every attempt to update the post like an XSS attack.

I had an issue like yours a few years ago and it drove me crazy, but I had to try out some solutions to finally find out the perfect one for me. Try one of these, they can't do no harm:

First: try to CHMOD your post.php to 774. Or even better, for the sake of your solution, chmod your wp-admin and wp-content folder to 777 and see if it works and then switch it back, so you will be able to pin point it.

Second: Add this part to the beggining of your .htaccess file:

<Files post.php>
Order Deny,Allow
Deny from all
Allow from all
</Files>

Instead of "all" in the "Allow from all" field you can just enter your IP.

Third: In my case, renaming this part

<IfModule mod_rewrite.c>

to this

<IfModule mod_rewrite.so>

helped, as I think this is a platform-specific, or configuration-specific issue, where Mac OS and Linux Apache installations are set up for .so AKA 'shared-object' modules. Looking for a .c module shouldn't break the conditional, I think that's a bug, but it's the issue.

Try any of these and I hope something will help you as it did to me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!