WordPress is giving me 404 page not found for all pages except the homepage

后端 未结 22 1236
独厮守ぢ
独厮守ぢ 2021-01-29 21:35

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 swea

相关标签:
22条回答
  • 2021-01-29 22:18

    Within the WordPress admin interface do the following:

    1. Go to admin setting

    2. Click on permalink and select post name in radio button.

    3. Scroll down and you will see .htaccess code here like.

      <IfModule mod_rewrite.c>
          RewriteRule ^index\.php$ - [L]
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule . /wordpress/index.php [L]
      </IfModule> 
      
    4. Copy the code and paste in the .htaccess file.
    0 讨论(0)
  • 2021-01-29 22:19
    • Check that the directory on .htaccess are the correct
    • Check the fields "siteurl" and "home" are the correct
    0 讨论(0)
  • 2021-01-29 22:19

    I installed mod_rewrite to fix the issue. Below link provides an installation guide:- http://www.iasptk.com/enable-apache-mod_rewrite-ubuntu-14-04-lts/

    0 讨论(0)
  • 2021-01-29 22:20

    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.

    0 讨论(0)
  • 2021-01-29 22:20

    Case 1:- Let us think if migrate site from one hosting to another hosting if see this kind of issue.

    Solution:- Simply go to old server copy .htaccess file code, then past in new server .htaccess file. 99% it i will works.

    0 讨论(0)
  • 2021-01-29 22:21

    I had this issue not so long ago. I had reset my permalink to default or just saved it, updated themes/core to (4.7.4)/plugins, deactivated all plugins, switched to default theme, optimized database, .htaccess is already default, checked file permissions, mod_rewrite is on.

    So far nothing works, what works are the posts, new page, the /contact page EXCEPT for old pages.

    Basically, the pages/URLs that aren't working are:

    /breeding
    /training
    /training/*
    /breeding/*
    

    Ultimate, I found these files in the root folder:

    /breeding.php and /training.php

    I renamed both files and the pages above worked.

    0 讨论(0)
提交回复
热议问题