解决WordPress托管站的密码提示问题

此前总有提示输入密码,虽然不爽也没工夫解决,后来研究了一下,也就几分钟的事情,现在好用了,大家可以试试。

Removing wp-admin Login Prompt

For security purposes, your WordPress app has an initial login prompt that opens when accessing the /wp-admin/ page. To remove this prompt, follow these steps.

If your instance was deployed after December 1st 2019 we have included a script for your convenience to do this for you.

  1. Login to your server using ssh as root.
  2. Run the command /opt/vultr/remove-htaccess.sh

If your instance was deployed before that date it will need to be done manually.

  1. Login to your server using ssh as root.
  2. Create a backup of your vhost files: cp /etc/nginx/conf.d/*.conf /root/
  3. Edit both vhost files in /etc/nginx/conf.d/. You need to remove the block of code that starts with location ^~ /wp-admin/. It is about 15 lines long.
  4. Save your changes, and restart the web server: systemctl restart nginx.service && systemctl restart php7.2-fpm.service ( PHP version may vary )

image

相关信息: https://www.vultr.com/docs/one-click-wordpress

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注