Learn about Centmin Mod LEMP Stack today
Register Now

Wordpress How to let WP handle all 404 errors ?

Discussion in 'Blogs & CMS usage' started by Mask, Dec 7, 2014.

  1. Mask

    Mask Active Member

    108
    31
    28
    Nov 10, 2014
    Ratings:
    +37
    Local Time:
    4:19 PM
    Nginx 1.9.1
    MariaDB 10.0.19
  2. Mask

    Mask Active Member

    108
    31
    28
    Nov 10, 2014
    Ratings:
    +37
    Local Time:
    4:19 PM
    Nginx 1.9.1
    MariaDB 10.0.19
    Or can I at least show my own error page instead of "Default" Nginx error page in the case above ??

    (Uncommenting include /usr/local/nginx/conf/errorpage.conf makes all 404 errors show this error page. i.e. half way above where in some cases WP will handle 404 pages wont even work when you change that.)
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,564
    12,224
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,793
    Local Time:
    9:19 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Thanks how you normally do it if you use errorpage.conf just edit and customise the 404.html file. AFAIK, no way for WP to handle it all out of the box for WP and for performance reasons, you should let Nginx handle 404 pages rather than WP.
     
  4. Mask

    Mask Active Member

    108
    31
    28
    Nov 10, 2014
    Ratings:
    +37
    Local Time:
    4:19 PM
    Nginx 1.9.1
    MariaDB 10.0.19
    Can't we just have custom error pages when WP can not handle error??
    Like right now without using errorpage.conf
    domain.com/category/telemo-error/ gives me 404 page using WP (a custom page using theme)
    domain.com/category/wong.html gives me default nginx 404 page.

    If I use errorpage.conf , all errors will give me custom error pages. Can't I just use it for the 2nd case above??
     
  5. AKIN SENOL

    AKIN SENOL Member

    36
    3
    8
    Oct 17, 2014
    London
    Ratings:
    +8
    Local Time:
    11:19 AM
    1.9.12
    10.1.12
    I wondered too, could you fix them?