WordPress is giving me 404 page not found for all

2020-05-11 03:23发布

All of a sudden I go to my WordPress website and all the pages give me a 404 page not found page. I'm assuming the problem lies with the permalink structure, which I could swear I did not touch. The permalink setting is on "month and name."

I've researched similar instances of this problem online and a lot of it has to do with the .htaccess file? I tried finding, but I can't. Perhaps it got deleted somehow? Where is it supposed to be located.

Any suggestions will be helpful

and of course I can see hidden files.

标签: wordpress
22条回答
爷的心禁止访问
2楼-- · 2020-05-11 04:13

Fixing that problem is very simple if you was using permalinks other than the default such as Day and name, Month and name, Numeric, Post name or Custom Structure, you only need to

Login to your admin area: Settings > Permalinks which should be : http://yoursite.com/wp-admin/options-permalink.php

Choose Default permalink setting, then save changes

Then you can return it again to your other previous permalink choice or keep it as default as yo wish

Note that this problem can happen when you move your site from a domain or location to another one.

查看更多
Summer. ? 凉城
3楼-- · 2020-05-11 04:13

This error is causing due to disabled of rewrite mod in apache httpd.conf document ,just uncomment it and enjoy the seo friendly permalinks

查看更多
【Aperson】
4楼-- · 2020-05-11 04:13

We had the same problem and solved it by checking the error.log of our virtual host. We found the following message:

AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /srv/www/htdocs/wp-intranet/

The solution was to set Options All and AllowOverride All in our virtual host config.

查看更多
我欲成王,谁敢阻挡
5楼-- · 2020-05-11 04:14

.htaccess is a hidden file, so you must set all files as visible in your ftp.

I suggest you return your permalink structure to default ( ?p=ID ) so you ensure that .htaccess is the problem.

After that, you could simply set "month and name" structure again, and see if it works.

PS: Have you upgraded to 3.1? I've seen some people with plugin issues in this case.

查看更多
【Aperson】
6楼-- · 2020-05-11 04:14

I have the same problem and so I remove the Apache and make it again and the problem was solved.

查看更多
男人必须洒脱
7楼-- · 2020-05-11 04:14

If your WordPress installation is in a subfolder (ex. https://www.example.com/subfolder) change this line in your WordPress .htaccess

RewriteRule . /index.php [L]

to

RewriteRule . /subfolder/index.php [L]

By doing so, you are telling the server to look for WordPress index.php in the WordPress folder (ex. https://www.example.com/subfolder) rather than in the public folder (ex. https://www.example.com).

查看更多
登录 后发表回答