Skip to content

404 Error on WordPress on Cloudways: Causes and Fixes

On this page

Last updated: · By

In short: a 404 error (Not Found) means the server received the request but couldn’t find the page or file. On WordPress at Cloudways, the usual causes are permalinks that need re-saving, an htaccess file that didn’t come across in a site migration, an application on the Lightning Stack with htaccess rules that never get read, file permissions, a problematic plugin, or stale cache. In most cases, re-saving the permalinks under Settings and then Permalinks, plus clearing the cache, fixes it in two minutes.

⏱ Time needed: 2–20 minutes, depending on the cause · Difficulty: easy to intermediate · Last checked against the official documentation: 6 Nov 2026

What a 404 error is and how it differs from other errors

With a 404 the server is working and the site is answering, but the address you asked for leads nowhere. That’s the difference from a 500 error, where the server gets stuck halfway through handling the request, and from 502 and 504 errors, where one part of the server didn’t respond in time.

ErrorWhat happenedWhere to start
404 Not FoundThe request arrived, the page or file wasn’t foundPermalinks, htaccess, a deleted page
500 Internal Server ErrorPHP code or a setting crashedThe guide to the 500 error
502, 503, 504A service on the server didn’t respond in timeThe guide to 502–504 errors
White screenPHP failed without showing a messageThe white screen guide

It’s also worth knowing that WordPress itself returns a 404 for any address that has no post or page. So a single 404 on a mistyped URL is normal. What you need to deal with is a 404 on pages that should exist.

What to prepare before you start

  • Access to the WordPress dashboard, and if it doesn’t load, SSH or SFTP access. See the WP-CLI guide.
  • A backup before you edit htaccess or disable plugins on a live site.
  • A list of two or three addresses that return 404, so you can check after each step whether the problem is solved.

Quick diagnosis: what you see and the likely cause

The type of 404 tells you a lot about the cause. Find the row that matches your case and jump to the relevant step.

What you seeLikely causeWhat to do
The home page works, every other page is a 404The permalink rules aren’t loadingSteps 3 and 4
Everything is a 404 after a manual site migrationThe htaccess file (a hidden file) wasn’t copiedStep 4
Redirect rules or custom htaccess don’t workThe application is on the Lightning Stack, with no ApacheStep 5
Specific pages that were deleted or changed addressThe page really doesn’t existA 301 redirect (see the redirects section)
Images, CSS or JS return 404Missing files, a damaged theme, or a permissions problemSteps 6 and 7
404 only after installing a pluginThe plugin changes URL rules or blocks requestsStep 7
You fixed it and still see a 404Stale cache (Varnish, Breeze, browser)Step 2
Multisite subsites in a subdirectoryA network that depends on htaccess on the Lightning StackStep 5
The whole site is a 404 or shows a different siteThe domain isn’t attached to the application, or the Web Root is wrongStep 8

How to fix a 404 error, step by step

Go through the steps in order. They run from the quickest and most common to the rarest.

Step 1: Check the address and the logs

  1. Open the address in an incognito window and check for a typo, an extra slash or capital letters where there should be lowercase.
  2. In the Cloudways panel open the application, then Monitoring, Logs and Access Logs.
  3. Look for requests with a 404 status. You’ll see exactly which addresses fail, and whether a bot is crawling addresses that don’t exist.
Access Logs with requests and responses
Access Logs: here you see which addresses return 404 and who requested them

A full explanation of the logs and Debug mode is in the guide to logs and debugging.

Step 2: Clear the cache

If you’ve already fixed something, or the page worked an hour ago, you may be seeing an old 404 response from the cache.

  1. In the panel, in the application settings, click Purge to clear Varnish.
  2. In WordPress, clear the Breeze cache, or the cache of whichever caching plugin you use.
  3. Check again in an incognito window.
General application settings: Webroot, permissions reset and cache purge
The general application settings: cache purge, Web Root and permissions reset on the same screen

All the cache types and the ways to clear them are collected in the guide to clearing cache on Cloudways.

Step 3: Re-save the permalinks

This solves more than half of the cases where the home page works and the inner pages don’t. Saving rebuilds WordPress’s URL rules.

  1. In the WordPress dashboard go to Settings and then Permalinks.
  2. Without changing anything, click Save Changes.
  3. Check the addresses that failed.

If the dashboard doesn’t load, do the same from the terminal:

wp rewrite flush

Step 4: Check the htaccess file (on the Hybrid Stack)

On the Hybrid Stack, where Nginx and Apache work together, Apache reads .htaccess in the public_html folder. In a manual migration the file sometimes gets left behind because it’s hidden, and then WordPress can’t route addresses.

  1. Connect over SFTP or through the file manager, and turn on showing hidden files.
  2. Check that the public_html folder contains a .htaccess file, and that it includes the default WordPress block.
  3. If it’s missing or broken, keep a copy of the existing one and create a file with this block:
# 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

The RewriteEngine On line is what switches on mod_rewrite in the file. Without it there are no permalinks. Rules from plugins, such as redirects or security, should sit above or below this block, not inside it.

Step 5: Lightning Stack, custom rules and Multisite

On the Lightning Stack the server runs on Nginx only, with no Apache. An htaccess file simply isn’t read. Standard WordPress works there without trouble, but any custom rule that lives in htaccess, such as old redirects or the routing of subsites in a subdirectory Multisite, won’t take effect.

  1. In the application settings, check the WebStack tab: Lightning or Hybrid.
  2. If you have htaccess rules the site depends on, move them to Web Rules, or go back to the Hybrid Stack.
  3. A subdirectory Multisite network that came from another host usually needs Hybrid. More in the WordPress Multisite guide.
Choosing a Web Stack: Lightning or Hybrid
Choosing a Web Stack: Lightning has no Apache, so htaccess isn’t read

Step 6: Reset file permissions

Wrong permissions, for example after an SFTP upload with a different user, can stop the server from serving files, and sometimes that looks like a 404 on images or CSS files.

  1. In the application settings find Reset File/Folders Permission.
  2. Choose a user. Usually the application user, not the master user.
  3. Click Reset. Folders get permission 775 and files 664, inside public_html.

Step 7: Plugins, theme and PHP memory

  1. Disable plugins that were recently installed or updated, especially redirect, security, language and caching plugins. No dashboard access? wp plugin deactivate plugin-name.
  2. If the 404 shows up only on theme files, switch temporarily to a default theme. A theme with missing files produces 404s on CSS and JS.
  3. On Elementor sites, regenerate the CSS files from the Elementor settings so they don’t point to files that were deleted.
  4. Cloudways notes that exhausting PHP memory can also lead to a 404. In the panel choose the server, then Settings & Packages and the Basic tab, and raise the Memory Limit (the default is 256MB). Recommendations by server size are in the PHP settings guide.

Step 8: Whole site is a 404? Check the domain and Web Root

  1. In the application’s Domain Management, make sure the domain is set as primary or additional in the right application.
  2. Make sure the domain’s A record points to this server’s IP address, not to an old server.
  3. In the application settings check the Web Root. The default is public_html. If someone changed it to an empty folder, the whole site will return 404.
  4. If you changed the domain manually, make sure the address was updated in the database too, with a search-replace.

After all the changes, Cloudways recommends clearing Varnish and restarting Memcached from Manage Services on the server, if it’s active, and then checking in a fresh browser window.

Black Friday80% off
80% off 2 months of managed hosting

The code BFCM802 takes 80% off your bill for the first two months (up to $200 off per month), including unlimited free site migrations. New customers only, and only until the offer ends.

The offer ends on December 4, 2026 at 23:59 (UTC+2).

Ends in—days—hours—minutes—seconds
Code:
Grab the 80% now

Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.

After Black Friday: 30% off for 3 months with the code ASAEL. On a large server (above about $444 a month) ASAEL already saves more today. BFCM802 vs. ASAEL calculator

How to handle a page that was deleted or changed address (301 redirects and SEO)

When a page really doesn’t exist any more, there’s nothing to “fix” on the server. What you do need is to decide where to send whoever lands on it.

SituationWhat to do
The page moved to a new addressA 301 redirect to the new address
A similar page replaces itA 301 redirect to the similar page
The content is gone entirely with no replacementLeave the 404 (or 410), with a useful 404 page
Many old URLs after a restructureA general redirect rule in Web Rules or htaccess

You set up redirects in Web Rules in the panel, in htaccess on the Hybrid Stack, or with a redirect plugin in WordPress. Don’t redirect every 404 to the home page: Google treats that as a soft 404, and the visitor doesn’t get what they were looking for. To see which addresses Google finds as 404, check the pages report in Google Search Console.

URLs with non-Latin characters: an address with non-Latin characters in the path is sent to the server percent-encoded (%D0%...). When you set up a redirect for such an address, test it in the browser after saving, because some tools expect the encoded version and some expect the plain characters.

Common mistakes and how to fix them

You saved the permalinks and still get a 404: check that the cache was cleared, and then the Stack. On Lightning, a plugin that writes rules to htaccess won’t have any effect.

You uploaded an old htaccess from your previous host and the site went down completely: rules from another server, such as PHP settings or redirects to old paths, don’t suit Cloudways. Keep only the WordPress block, and add rules one at a time. If the site returns a 500, see the guide to the 500 error.

wp-admin returns a 404: a security plugin changed the login address. Try the address you set in the plugin, or disable the plugin from the terminal.

404 on images after a migration: the uploads folder wasn’t copied in full, or the addresses in the database point to the old domain. Check the files on the server and replace the addresses with a search-replace.

Lots of 404s from odd addresses like wp-login or .env: these are bots scanning for vulnerabilities. It isn’t a fault in the site, but a large volume loads the server. See the guide to high CPU load.

Sources

The official sources this page is based on (checked 7 Nov 2026):

Frequently asked questions

Why does the home page work while the other pages return 404?

Because WordPress’s permalink rules aren’t loading. Go to Settings and then Permalinks and click Save Changes, or run wp rewrite flush. If that doesn’t help, check that an htaccess file exists on the Hybrid Stack.

Do 404 errors hurt SEO?

A 404 on addresses that never existed does no harm. A 404 on pages that used to rank loses the ranking and the links that pointed to them. That’s why you redirect pages that changed address with a 301, and leave a 404 only for content that was deleted with no replacement.

Why doesn’t htaccess work on Cloudways?

Most likely the application runs on the Lightning Stack, which has no Apache, so htaccess isn’t read at all. Move the rules to Web Rules, or switch to the Hybrid Stack in the WebStack tab of the application settings.

Should I redirect all 404 pages to the home page?

No. Google treats a blanket redirect to the home page as a soft 404, and the visitor doesn’t find what they were looking for. Redirect each address to the most relevant page, and keep a 404 page with a search box and links to your main content.

I got a 404 after moving a site to Cloudways. What do I check first?

Three things, in order: that the htaccess file was copied (it’s hidden), that the permalinks were re-saved, and that the domain in the database was updated to the new address. Then clear the cache.

Official source: How to Resolve 404/Not Found Error, How to Change Your Application Stack (Cloudways Knowledge Base). This guide was written and tested by Asael Dreyer · Updated: 6 Nov 2026

Disclosure: this is an independent site, not the official Cloudways site. Some links on this site are affiliate links: if you sign up through them we earn a commission, at no extra cost to you. Full details

Picture of Asael Dreyer
Asael Dreyer

Hi, I'm Asael Dreyer, CEO of an SEO agency that runs hundreds of websites hosted on dozens of Cloudways servers.
Everything you will find here comes from hands-on experience, mine and my teams', straight from the field: from the guides to the recommendations. All to help you get the most out of Cloudways.

More about me →

Need help? Got a question about your server or this guide? Write to us and we will get back to you.

More guides on this topic:
מפריד
Thanks for your message!
We will get back to you soon.
Ready to get started?

Sign up with the coupon code ASAEL