server - Wordpress mod_rewrite not working on php fpm

admin2025-06-05  3

Today I tried to change the webserver to php fpm and it is really very fast
But there is a very serious problem I found when I installed Wordpress, when I changed the premalink to anything but the normal, it not working and gives me "404 error"
I don't know what is the problem, Is it a server problem or worpdress ?
I'm the server admin and I using CWP but don't know what to do

Today I tried to change the webserver to php fpm and it is really very fast
But there is a very serious problem I found when I installed Wordpress, when I changed the premalink to anything but the normal, it not working and gives me "404 error"
I don't know what is the problem, Is it a server problem or worpdress ?
I'm the server admin and I using CWP but don't know what to do

Share Improve this question asked Dec 7, 2018 at 18:19 Gamal ElwazeeryGamal Elwazeery 259 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

It was a nginx config problem
Solved it by adding this line to .conf file

try_files $uri $uri/ /index.php?q=$uri&$args;

Check your

.htaccess file for apache server

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

file and check if you have updated PHP version. For more info, you can refer to WordPress documentation

If still, you face issue then try .user.ini files analogue to .htaccess

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749082422a316210.html

最新回复(0)