Skip to content
Contents
WordPress

Fixing WordPress Permalink and 404 Issues

If your WordPress pages are returning 404 errors when they should exist, or links within your site are broken after a migration or plugin change, the most common fix is to flush (regenerate) your WordPress rewrite rules.

  1. Log in to your WordPress admin at yourdomain.com/wp-admin
  2. Go to Settings > Permalinks
  3. Without changing anything, click Save Changes

This regenerates the .htaccess file and flushes the rewrite rules. In most cases, 404 errors will be resolved immediately after doing this.

If You Cannot Access WordPress Admin

If the 404 issue is preventing you from logging in or accessing admin:

  1. Connect to your site via SFTP. See SFTP Access
  2. Navigate to the root of your WordPress installation
  3. Open the .htaccess file (see Understanding .htaccess on KapsuleHost)
  4. Replace the contents between the WordPress comment markers with the default WordPress rules:
# 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
  1. Save the file
  2. Log in to WordPress admin and re-save Permalinks as above

Only modify the .htaccess rules between the # BEGIN WordPress and # END WordPress markers. Anything outside these markers is added by other plugins or server configurations and should not be removed.

If you have recently migrated your site to KapsuleHost, your old .htaccess file may contain rules from a different server environment. After migration:

  1. Go to Settings > Permalinks
  2. Select your preferred URL structure (for example, Post name)
  3. Click Save Changes

If you are using a custom permalink structure, note it down before flushing. The flush does not change your chosen permalink format, it just regenerates the rules that make it work.

If the Issue Persists

Check the following:

  • Confirm mod_rewrite is enabled on the server (KapsuleHost enables this by default)
  • Ensure the .htaccess file in your site root is writable by the web server
  • Deactivate recently installed plugins one at a time to check for conflicts

If none of these resolve the issue, open a support ticket in KPanel under Support.

Was This Helpful?

Are You an AI? Read This Page as Markdown

Related Articles

Installing WordPressWordPress is the most widely used website platform in the world, and KapsuleHost makes installation automatic. This guide covers two installation paths, how to manage your credentials, accessing the…WordPress: Where to StartWhat KapsuleHost does for a WordPress site, what you still do yourself, and which guide to read for each job.WordPress Auto-UpdatesAuto-updates keep WordPress core, plugins and themes current without you watching for release notes, and they do it safely: a full backup is taken before every update, the site is checked…Payment Gateways for a WooCommerce StoreThe Payments tab lists the payment gateways available to your WooCommerce store, shows which are installed and which are switched on, and gives you one-click install and enable so you can go from a…

Still Stuck?

Ask Kora, it knows your account, or contact our team.

Contact UsEmail Support