Problems while installing a new WordPress, as a mark

1.Wordpress Not automatically update in the background

the user of the file which running wordpress needs more permission.

chown -R apache:apache /var/www/html/*(/var/www/html is the dir of wordpress )

2.The WordPress program can not switch or install themes in the background

1、vi /usr/local/php/etc/php.ini

2、find “disable_functions” and   delete “scandir”

502 Bad Gateway Automatically restart Script

Automatically restart the PHP process. Applicable to LNMP environment.

The following files, stored in / root or other directory:

RESULT=`curl -I $MY_URL|grep "HTTP/1....1 502"`
if [ -n "$RESULT" ]; then
        /etc/init.d/php-fpm restart

Give Executable permission:

chmod +x /root/

use crontab set up automatic operation:

crontab -e
* * * * * /root/

crontab -e , a(Enter the edit mode) , shift+:wq (save and quite)

Related Images

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.