Focus on cloud service provider activities
Notes on website operation and maintenance

Resolve the lack of "WP-ADMIN" path in WordPress background under LNMP environment

LNMP One click installation package is also one of the environments Lao Zuo likes to use. Yesterday, I helped a netizen build it LNMP After logging into the WP background and clicking the menu on the left, I found a direct jump error of 404. At first, I thought there was a database problem. Looking up, I saw that the path in the address bar was missing the "wp admin" path. Wordpress redirection is missing. The solution is simple. We can modify it in the/usr/local/nginx/conf/wordpress.conf file.

location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!- f $request_filename){
rewrite (.*) /index.php;
}
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

The green part is to be added. After adding, restart lnmp to solve the problem of missing wp admin path

/root/lnmp restart

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Resolve the lack of "WP-ADMIN" path in WordPress background under LNMP environment


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge