A **404 error** means the requested page could not be found on the server. In WordPress, 404 errors on individual posts and pages are most commonly caused by broken **permalinks** or a corrupted **.htaccess** file. This guide covers the most common causes and how to fix them.

### Method 1: Reset Permalinks (Most Common Fix)

This is the simplest and most effective fix for WordPress 404 errors on posts and pages:

1. Log in to your **WordPress Dashboard** (`yourdomain.com/wp-admin`).
2. Go to **Settings** → **Permalinks**.
3. **Without changing anything**, scroll to the bottom and click **Save Changes**.
4. Visit your website and test the pages that were returning 404 errors.

This regenerates the rewrite rules in the `.htaccess` file without changing your URL structure.

### Method 2: Manually Repair the .htaccess File

If resetting permalinks does not work, the `.htaccess` file may be corrupted:

1. Log in to **cPanel**.
2. Go to **Files** → **File Manager**.
3. Navigate to `public_html`.
4. Find the `.htaccess` file. If you cannot see it, click **Settings** (top-right) and enable **Show Hidden Files**.
5. Right-click `.htaccess` and select **Rename**. Rename it to `.htaccess-old`.
6. Go back to WordPress: **Settings** → **Permalinks** → **Save Changes**.
7. WordPress will create a fresh `.htaccess` file with the correct rules.

The default WordPress `.htaccess` should contain:

```
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
```

### Method 3: Check Plugin Conflicts

Some plugins (especially security, caching, or SEO plugins) can interfere with permalinks:

1. In WordPress, go to **Plugins** → **Installed Plugins**.
2. Deactivate all plugins.
3. Check if the 404 errors are resolved.
4. Reactivate plugins one at a time, testing your site after each activation.
5. When the 404 error returns, the last activated plugin is the cause. Contact the plugin developer or find an alternative.

### Method 4: Clear Your Cache

- Clear your **browser cache** (Ctrl+F5 or Cmd+Shift+R).
- If you have a caching plugin (WP Super Cache, W3 Total Cache, LiteSpeed Cache), clear its cache.
- If your site uses **Cloudflare** or a server cache, purge it from your hosting or CDN dashboard.

### Common Causes of WordPress 404 Errors

- **Changed permalink structure** without saving permalinks.
- **Plugin conflict** after installing or updating a plugin.
- **Corrupted .htaccess** file.
- **Migrated or restored** the site without updating the database.
- **Deleted posts or pages** that are still linked in menus.
- **Case sensitivity** — Linux servers are case-sensitive (e.g., `MyPage` vs `mypage`).

### Important Notes

- Your homepage working while other pages return 404 is a strong indicator of a permalink issue.
- Always back up your `.htaccess` file before making changes.
- If none of these methods work, the issue may be server-level. Contact your hosting provider.

### Troubleshooting

**Permalink reset does not fix the issue:**

- Check that the `.htaccess` file is **writable** (permissions set to `644`).
- Verify that **mod\_rewrite** is enabled on the server. Contact your hosting provider to confirm.

**404 errors on custom post types only:**

- The plugin that registers the custom post type may need updating.
- Go to **Settings** → **Permalinks** → **Save Changes** to flush the rewrite rules.

**404 error after migrating to a new server:**

- Update the **site URL** and **home URL** in the `wp_options` table via phpMyAdmin.
- Verify the domain DNS is pointing to the correct server.

### Related Guides

- [Fix the white screen](/hc/help/en/articles/how-to-fix-wordpress-white-screen-of-death-wsod-via-cpanel)
- [Fix DB connection](/hc/help/en/articles/how-to-fix-database-connection-errors-in-wordpress)
- [Update plugins/themes](/hc/help/en/articles/how-to-update-wordpress-plugins-and-themes-safely)