Articles in this section

WordPress website hosted on Plesk servers shows Error 404 on some pages: File or directory not found

kb: technical ABT: Group B Plesk Onyx for Windows

Applicable to:

  • Plesk Onyx for Windows
  • Plesk for Windows

Symptoms

  • On WordPress website hosted on Plesk for Windows server, the following error is shown on all pages except home page:

    CONFIG_TEXT: HTTP Error 404.0 - Not Found
    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

  • Permalinks are enabled in WordPress administrator panel > Settings
  • WordPress basic requirements for permalinks are met: Microsoft IIS 7+ web server with the URL Rewrite 1.1+ module is installed, PHP 5 is running as FastCGI.
  • The following error is present in the IIS Failed Request Tracing log:

    CONFIG_TEXT: ModuleName IIS Web Core 
    Notification MAP_REQUEST_HANDLER 
    HttpStatus 404 
    HttpReason Not Found 
    HttpSubStatus 0 
    ErrorCode The system cannot find the file specified. (0x80070002)

Cause

Rewrite rule is not configured or wrong configured for IIS to handle permalinks correctly.

Resolution

  1. Log in to Plesk GUI
  2. Go to Domains > example.com > File Manager > Click New > Create File , specify File name as web.config and click OK to create the file.
  3. Click on web.config file and paste the following content into the opened Code Editor to configure permalinks via web.config:

    CONFIG_TEXT: <?xml version="1.0" encoding="UTF-8"?> 
    <configuration> 
    <system.webServer> 
    <rewrite> 
    <rules> 
    <rule name="WordPress Rule" stopProcessing="true"> 
    <match url=".*" /> 
    <conditions> 
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
    </conditions> 
    <action type="Rewrite" url="index.php" /> 
    </rule> 
    </rules> 
    </rewrite> 
    </system.webServer> 
    </configuration>

  4. Click OK to save the file.

Additional information

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.