If you encounter a message saying “Not Found – The requested URL was not found on this server” when clicking links on your WordPress site, it often indicates a broken permalink structure. This is a common cause of 404 errors in WordPress.

Symptoms

You may experience one or more of the following issues:

  • Clicking on any page, post, or category link leads to a “404 Not Found” page.
  • The homepage loads normally, but internal links do not.
  • Custom post type pages (e.g., “/blog” or “/portfolio”) return an error.
  • The error message may also include a line like:

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

  • Refreshing the page or clearing the cache does not resolve the issue.

These symptoms indicate that WordPress cannot find or properly route your URLs.

Cause

WordPress uses a file called .htaccess to manage how URLs (links) are handled.
If this file is missing or corrupted, your links may stop working, and visitors will see a 404 error instead of the correct page.

Resolution

  1. Log in to your WordPress Dashboard.
  2. Go to Settings > Permalinks.
  3. Click Save Changes (you don’t need to change any settings).
  4. This will regenerate the .htaccess file with the correct rewrite rules.
  5. Test your website links again.

If your pages now load correctly, your .htaccess file was likely missing or damaged.

Why This Works

When you click Save Changes, WordPress automatically rebuilds the .htaccess file.
This restores the rewrite rules that tell your web server how to load your pages, fixing most “Not Found” or 404 issues.

If the Problem Persists

If you still encounter errors after following the steps above, check the following:

  • Ensure your .htaccess file exists in the main WordPress directory.
  • Verify that the file has the correct permissions (it should be writable by the web server).