1. Knowledge Base
  2. >
  3. Results
  4. >
  5. 404 Errors After Clicking WordPress Links

404 Errors After Clicking WordPress Links

When working with WordPress, 404 Page Not Found errors often occur when a new theme has been activated or when the rewrite rules in the .htaccess file have been altered.

When you encounter a 404 Page Not Found error in WordPress, you have two options for correcting it.

Option 1: Correct the Permalinks

  1. Log in to WordPress.
  2. From the left-hand navigation menu in the WordPress Admin Dashboard, hover over Settings and then click Permalinks (Note the current setting. If you are using a custom structure, copy or save the custom structure somewhere.)
  3. Select Plain.

    WordPress Permalinks

  4. Click Save Changes.

This will reset the permalinks and fix the issue in many cases. If this doesn't work or if you are unable to login to your WordPress Dashboard for some reason, you may need to edit your .htaccess file directly. Please see below ⤵ on how to modify your .htaccess file.

Option 2: Modify the .htaccess File

Your second method involves adding the snippet below to your .htaccess file. If you need more instructions on how to do that, see our article, How to Edit Your .htaccess file.

  1. Add the following snippet of code to the top of your .htaccess file:
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress
  2. Click Save Changes.
  3. Reload your WordPress website to check.

If your blog is showing the wrong domain name in links, redirecting to another site, or is missing images and style, these are all usually related to the same problem: you have the wrong domain name configured in your WordPress blog. For details on how to resolve this problem, please refer to the following article:

If you are still having issues with this method or need additional assistance, reach out to HostGator via phone or Live Chat .