0

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:

example.com/index.php/sample-post/

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"?>
<configuration>
  <system.webServer>
 <httpErrors errorMode="Detailed" />
    <directoryBrowse enabled="true" />
    <rewrite>
      <rules>
        <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>
        <rule name="WordPress: http://example.net" patternSyntax="Wildcard">
          <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>
  <system.web>
    <trust level="Full" />
<customErrors mode="Off" />
        <compilation debug="true" />
  </system.web>
</configuration>

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.