WordPress website returns a 404 Page Not Found error on internal pages and posts

Started by senthil, Oct 17, 2025, 07:28 AM

Previous topic - Next topic

senthil

Applicable to:
  • Plesk for Linux

Symptoms

  • Plesk Obsidian running on Linux-based operating system
  • A WordPress website hosted on a Plesk server uses only Apache as its web server and returns returns the
    error HTTP 404 Page Not Found on internal pages and posts, when visited via a browser.
  • A .htaccess is missing from the main directory (Document root) of the WP installation (it may also be empty
    or containing incorrect information)

Cause

A Wordpress website that is hosted on an Apache web server requires the existence of a default .htaccess file
within its main directory. If this file is missing or has improper content, such 404 errors are expected.

Resolution

  • Log into Plesk
  • Go to Domains > example .com > Dashboard > Files
  • Navigate to the main directory of the WP installation
  • Add the default WordPress .htaccess rewrite rules in the .htaccess file that resides within the main directory
    of the website:
    # BEGIN WordPress

    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]

    # END WordPress

Once this is done, the internal pages and posts of the WP installation will be displayed properly.