You are currently viewing WordPress website shows 404 Not Found Plesk Onyx

WordPress website shows 404 Not Found Plesk Onyx

WordPress website shows 404 Not Found Plesk Onyx

For existing website:

Add the content below to the Additional nginx directives field in Plesk at Domains > example.com > Apache & nginx Settings:

if (!-e $request_filename) {
set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
set $test “${test}C”;
}
if ($test = PC) {
rewrite ^.*$ /index.php break;
}

For new websites only:

Add the content below to the nginx directives field in the service plan configuration in Plesk at Service Plans > Example Plan > Web Server tab:

if (!-e $request_filename) {
set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
set $test “${test}C”;
}
if ($test = PC) {
rewrite ^.*$ /index.php break;
}

Note: Additional nginx directives will be applied to new websites only created under this server plan. All existing websites under this service plan will not take changes.

Jobair Alam Bipul

I'm Jobair Alam, a cPanel Certified WHM/cPanel server administrator and web hosting expert with over 10 years of experience in the industry.

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.