1. Home
  2. WordPress Management
  3. Resolving WordPress 404 Errors: Permalink and .htaccess Troubleshooting Guide

Resolving WordPress 404 Errors: Permalink and .htaccess Troubleshooting Guide

Overview

If internal pages show 404 errors even though the content exists, the cause is usually permalink configuration or a corrupt .htaccess file. Use the steps below on your WPCloud-hosted WordPress site.


  1. Log in to WordPress Dashboard
  2. Go to Settings → Permalinks
  3. Click Save Changes (no need to modify anything)

This regenerates .htaccess with the correct rewrite rules.


Default WordPress .htaccess

Paste/compare with the standard rules below (root of the site, usually public_html):

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

WordPress with LiteSpeed Cache (.htaccess)

If you use LiteSpeed Cache on WPCloud, your .htaccess will include additional blocks like:

# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule litespeed/debug/.*\.log$ - [F,L]
RewriteRule \.litespeed_conf\.dat - [F,L]
### marker ASYNC start ###
RewriteCond %{REQUEST_URI} /wp-admin/admin-ajax\.php
RewriteCond %{QUERY_STRING} action=async_litespeed
RewriteRule .* - [E=noabort:1]
### marker ASYNC end ###

### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###
### marker DROPQS start ###
CacheKeyModify -qs:fbclid
CacheKeyModify -qs:gclid
CacheKeyModify -qs:utm*
CacheKeyModify -qs:_ga
### marker DROPQS end ###
</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE

# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker BROWSER CACHE start ###
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType application/pdf A31557600
ExpiresByType image/x-icon A31557600
ExpiresByType image/vnd.microsoft.icon A31557600
ExpiresByType image/svg+xml A31557600
ExpiresByType image/jpg A31557600
ExpiresByType image/jpeg A31557600
ExpiresByType image/png A31557600
ExpiresByType image/gif A31557600
ExpiresByType image/webp A31557600
ExpiresByType video/ogg A31557600
ExpiresByType audio/ogg A31557600
ExpiresByType video/mp4 A31557600
ExpiresByType video/webm A31557600
ExpiresByType text/css A31557600
ExpiresByType text/javascript A31557600
ExpiresByType application/javascript A31557600
ExpiresByType application/x-javascript A31557600
ExpiresByType application/x-font-ttf A31557600
ExpiresByType application/x-font-woff A31557600
ExpiresByType application/font-woff A31557600
ExpiresByType application/font-woff2 A31557600
ExpiresByType application/vnd.ms-fontobject A31557600
ExpiresByType font/ttf A31557600
ExpiresByType font/otf A31557600
ExpiresByType font/woff A31557600
ExpiresByType font/woff2 A31557600
</IfModule>
### marker BROWSER CACHE end ###
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE

Do not edit anything inside the LSCACHE or NON_LSCACHE markers; the plugin manages these automatically.


Plugin Considerations

  • Security plugins: Not required on WPCloud (server-side firewalls provided). Extra security plugins can conflict with permalinks—avoid installing them.
  • Caching:
    • LiteSpeed Cache — recommended (optimised for WPCloud)
    • Third-party caching plugins — not recommended; can cause permalink conflicts
    • WordPress default caching — not needed when using LiteSpeed Cache

Check for Plugin Conflicts

  1. Deactivate all plugins except LiteSpeed Cache
  2. Re-save permalinks (see Quick Fix above)
  3. Reactivate plugins one by one
  4. Test pages after each activation

Adjust .htaccess Permissions (temporary)

If issues persist, set stricter permissions temporarily via cPanel → File Manager:

  1. Open the site root (public_html)
  2. Right-click .htaccessChange Permissions
  3. Set to 444 (read-only)
  4. Test the site
  5. Revert to 644 after resolving the issue

When to Contact Support

Contact WPCloud if:

  • The issue persists after the steps above
  • You notice unexpected changes in .htaccess
  • Many pages suddenly return 404s
  • You need help restoring file permissions

Support portal: https://support.wpcloud.ca/

Updated on October 15, 2025
Was this article helpful?

Related Articles