Last active
November 28, 2018 06:06
-
-
Save yogoeasy/e8c3814e3179e2eb65d25af08c48face to your computer and use it in GitHub Desktop.
RunCloud建完WordPress之後要做的事[優易教學網]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # by Jack Wu 優易教學網 https://www.yogoeasy.com | |
| read -p "Enter web application NAME for this WordPress: " appname | |
| echo "************************************************" | |
| echo "設定wp-config.php (關掉WP Cron之後要設定cronjob)" | |
| echo "************************************************" | |
| sed -i "2i define( 'DISABLE_WP_CRON', true );" /home/runcloud/webapps/$appname/wp-config.php && sed -i "3i define( 'WP_MEMORY_LIMIT', '256M' );" /home/runcloud/webapps/$appname/wp-config.php && sed -i "4i define( 'WP_POST_REVISIONS', 10 );" /home/runcloud/webapps/$appname/wp-config.php | |
| chown runcloud:runcloud /home/runcloud/webapps/$appname/wp-config.php | |
| echo "********************************************" | |
| echo "設定Rocket-Nginx" | |
| echo "********************************************" | |
| tee -a /etc/nginx-rc/extra.d/$appname.location.main-before.wprocket.conf > /dev/null << 'EOF' | |
| # Rocket-Nginx configuration | |
| include rocket-nginx/default.conf; | |
| EOF | |
| nginx-rc -t && service nginx-rc restart | |
| echo "Check conf content:" | |
| cat /etc/nginx-rc/extra.d/$appname.location.main-before.wprocket.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment