WordPress 404 Not Found | What Is It & How To Solve It

WordPress 404 Not Found | What Is It & How To Solve It

Learn JavaScript Spread Operator in 1 minute Reading WordPress 404 Not Found | What Is It & How To Solve It 4 minutes Next Snappify: Canva for Code Snippets (2023)

The WordPress 404 Not Found error message is one of the most hated screens on the Internet; it indicates that though you, the browser, we’re able to communicate with the server, the page you need was not delivered either because it was not found or because the server for some reason was configured not to fulfill the request (which is happening in some countries with pages containing illegal content).

WordPress 404 not found the resource requested could not be found on this server

Your computer does not generate the page you see; instead, it is a particular page on the server you’ve tried to contact. Many websites create their own certain 404 pages either for artistic reasons or because the site owner wants to put specific data, like contact or redirect information, on the page.

Having your own particular 404 page in Apache is as simple as modifying the .htaccess file.

In most cases, the 404 error occurs when a page has been moved or deleted from a site. However, in the case of WordPress, an annoying bug can cause permalinks to point to the 404 page instead of the page you want to have it bring up.

The requested URL was not found on this server WordPress

WordPress Permalinks Not Working 404

What are permalinks in WordPress and how do they work?

WordPress permalinks are permanent URLs generated to point to your weblog posts, categories, and weblog lists. Other bloggers will use a permalink to point to your post from their articles, or you can send links to other people via a permalink. When linked to an individual post, the URL is supposed to be permanent, not dynamic (changing).

The three types of permalinks WordPress delivers are the Default (aka “Ugly”) form, mod-rewrite (“Pretty”), and PATHINFO (“Almost Pretty”).

  1. Default links are formatted according to the default settings of a new WordPress install and will work on all server environments. It looks like this: http://example.com/?p=N , N being a number. It is neither neat nor elegant, but it does the job.
  2. Pretty mod-rewrite links look more like this: http://example.com/yyyy/mm/dd/post-name/ . These permalinks require Apache’s mod_rewrite module and won’t work on other server types.
  3. PATHINFO permalinks look like this: http://example.com/index.php/yyyy/mm/dd/post-name/ , and will work on different server types besides Apache.

Because you’re going from a dynamic to a fixed environment with your permalinks, a variety of things can go wrong with them. For instance, if your server includes Frontpage Extensions, permalinks will not function at all without doing a manual fix. Without this fix, any changes to the permalinks section from the WordPress admin interface will corrupt the Frontpage server extensions because it interferes with the .htaccess file.

Long permalinks can also get chopped off, with only part of it working correctly or with the entire link disabled. This will cause a 404 error, not because there’s something wrong with your permalink, but because the title is too long. You can fix it by editing your .htaccess file to add a line:

RewriteRule ^post/(+)?/?(+)?/?$ /index.php?p=$1&page=$2 

You can also habitually post URLs with angle brackets () on either end. Most email and other problematic software won’t truncate URLs formatted this way.

Always double-check all your pages before you start working with permalinks and after you’ve permalinked them. In some cases, you may have to delete all the permalinks and start over, but in most cases, just looking at what you’re telling your server to do will prevent you from making many stupid mistakes.

If you want to learn more about the WordPress 404 Not Found error, visit this article: Common WordPress errors examples

Leave a comment

All comments are moderated before being published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.