admin管理员组

文章数量:1130349

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

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

本文标签: serverWordpress modrewrite not working on php fpm