I have a WordPress site hosted on GoDaddy hosting (Plesk Panel).

After upgrading the WordPress to 5.1 the home page and all posts return

404 error

it's working only when changing the permalinks to plain when changing back to any other type like post name or custom structure I got the same error!

Also, I have noted that the permalinks options show index.php as a part of the URL, ex:


I don't know why is it normal?!!

The .htaccess has the below code

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# End WordPress

The web.config

<?xml version="1.0" encoding="UTF-8"?>
 <httpErrors errorMode="Detailed" />
    <directoryBrowse enabled="true" />
        <rule name="Plesk. Wordpress redirect wpConfigRule #69a32c2b-7a52-4e20-97a6-034c797aadbf" stopProcessing="true">
          <match url="^wp-config.php$" ignoreCase="false" />
          <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
        <rule name="WordPress: http://example.net" patternSyntax="Wildcard">
          <match url="*" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          <action type="Rewrite" url="index.php" />
    <trust level="Full" />
<customErrors mode="Off" />
        <compilation debug="true" />

Please help me to solve this issue?!

I think the issue at web.config and htaccess so please support me with the correct instructions to

  • Modify the web.config and htaccess files to show the home page without index.php and 404 error plus

  • Using a custom structure like http://example.net/%postname%/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.