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

The LNMP one click installation package is also one of the environments that Lao Zuo likes to use. Yesterday, after helping a netizen set up the LNMP environment, he found that after logging in to the WP background, he clicked the menu on the left and found a direct jump error of 404. At first, he thought there was a database problem. Looking up, he saw that the original 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

Vote for you
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