WordPress: posts/pages return 404 (permalinks)
- 20.02.2026 00:58
-
- hosting
- troubleshooting
- wordpress
A common WordPress issue is: the homepage opens, but posts/pages return 404 Not Found. This usually happens when permalink (rewrite) rules are not applied correctly.
Step 1 – Re-save permalinks
- Log in to WordPress admin.
- Go to Settings → Permalinks.
- Click Save Changes (even if you do not change anything).
This forces WordPress to regenerate rewrite rules.
Step 2 – Check the document root
Make sure you are editing the correct website folder in your hosting subscription. On GARMTECH hosting the default document root is:
httpdocs
If WordPress is installed in a subfolder (for example httpdocs/blog), permalinks and rewrite rules must match that path.
Step 3 – Verify the .htaccess file
In most cases, WordPress permalinks require a correct .htaccess file in the WordPress root folder.
Typical WordPress rules look like this:
# 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
Step 4 – Clear caches
- Purge LiteSpeed Cache (LSCache) if enabled.
- Purge Cloudflare/CDN cache if you use it.
Step 5 – Check for conflicts
- Security plugins can block rewrite rules or REST routes.
- Incorrect custom rules in
.htaccesscan break permalinks. - If you recently changed domain, ensure WordPress URLs are updated correctly.
If the issue started right after migration, verify that WordPress files are in the correct folder and that the domain in Plesk points to that folder.