• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » WordPress Auto Install Script (Nginx Microcache and Plugins)

By Abhishek Ghosh May 13, 2015 7:18 pm Updated on May 13, 2015

WordPress Auto Install Script (Nginx Microcache and Plugins)

Advertisement

This WordPress Auto Install Script is for Creation of Nginx Microcache Backend with PHP5-FPM, XCache, MariaDB Running WordPress with Some Plugins. This is the second update of our previous script published here. This is fully intended for HP Cloud’s OpenStack environment but possibly it will work on any blank server including GNU/Linux local hosts – logically it should work.

 

WordPress Auto Install Script : Changelog

 

This script creates a Nginx PHP5-FPM backend and install WordPress on Ubuntu 14.04 LTS server. It is not possible to automate all the works. XCache must be manually configured as described here. Also the XCache Admin page should be created manually.

changelog
Vim
1
2
3
4
5
6
WordPress Auto Install Script
version 2.0
+ Added XCache
+ Added some WordPress Plugins
+ Added installing unzip
+ Banner changed

You must configure W3 Total Cache manually – it will not work out of the box.

Advertisement

---

WordPress Auto Install Script (Nginx Microcache and Plugins)

 

WordPress Auto Install Script

 

You can get the script or project from here on Github. Here is the full script for official reasons :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/bash -e
#
# written by Dr. Abhishek Ghosh
# under GNU GPL 3.0
clear
echo " "
echo "===================================="
echo "This Script Will Deploy WordPress"
echo "on OpenStack Nova Instance.Proceed?"
echo "===================================="
echo " "
read -p "Hit Y or N " -n 1 -r
echo " "
echo "==========================================="
echo "This Script is intended to run on GNU/Linux,"
echo " OS X, HP-UX and Other unix or unix like OS."
echo "We Will Ask Some Questions, Write Them on a"
echo "Text Editor and Save it."
echo " "
echo "Created By TheCustomizeWindows.com"
echo "==========================================="
echo "Is everything is fine?"
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo " "
sudo su
fi
echo " "
echo "Supply the MySQL password below:"
read password
echo " "
echo "Supply the MySQL database below:"
read wordpress
echo " "
echo "Supply the domain name below:"
read domain
 
MYSQLPASS="$password"
MYSQLDATABASE="$wordpress"
SERVERNAMEORIP="$domain"
 
apt update -y
apt-get -y install nginx
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password ${MYSQLPASS}"
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password ${MYSQLPASS}"
sudo apt-get -y install mysql-server mysql-client
 
apt-get install -y php5-mysql php5-fpm php5-gd php5-cli php5-xcache
echo "Configuring PHP5-FPM..."
echo " "
sed -i "s/^;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/" /etc/php5/fpm/php.ini
sed -i "s/^;listen.owner = www-data/listen.owner = www-data/" /etc/php5/fpm/pool.d/www.conf
sed -i "s/^;listen.group = www-data/listen.group = www-data/" /etc/php5/fpm/pool.d/www.conf
sed -i "s/^;listen.mode = 0660/listen.mode = 0660/" /etc/php5/fpm/pool.d/www.conf
sed -i "s/^\tworker_connections 768;/\tworker_connections 1536;/" /etc/nginx/nginx.conf
sed -i "s/^\t#passenger_ruby \/usr\/bin\/ruby;/\t#passenger_ruby \/usr\/bin\/ruby;\n\n\tfastcgi_cache_path \/usr\/share\/nginx\/cache\/fcgi levels=1:2 keys_zone=microcache:10m max_size=1024m inactive=1h;/" /etc/nginx/nginx.conf
sed -i "s/^\tindex index.html index.htm;/\tindex index.php index.html index.htm;/" /etc/nginx/sites-available/default
sed -i "s/^\tserver_name localhost;/\tserver_name $SERVERNAMEORIP;\n\n\n\t\tset \$no_cache 0;\n\t\tif (\$request_method = POST){set \$no_cache 1;}\n\t\tif (\$query_string != \"\"){set \$no_cache 1;}\n\t\tif (\$http_cookie = \"PHPSESSID\"){set \$no_cache 1;}\n\t\tif (\$request_uri ~* \"\/wp-admin\/|\/xmlrpc.php|wp-.*.php|\/feed\/|index.php|sitemap(_index)?.xml\") {set \$no_cache 1;}\n\t\tif (\$http_cookie ~* \"comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in\"){set \$no_cache 1;}\n/" /etc/nginx/sites-available/default
sed -i "s/^\tlocation \/ {/\n\tlocation ~ \\\.php$ {\n\t\ttry_files \$uri =404;\n\t\tfastcgi_split_path_info ^(.+\\\.php)(\/.+)\$;\n\t\tfastcgi_cache  microcache;\n\t\tfastcgi_cache_key \$scheme\$host\$request_uri\$request_method;\n\t\tfastcgi_cache_valid 200 301 302 30s;\n\t\tfastcgi_cache_use_stale updating error timeout invalid_header http_500;\n\t\tfastcgi_pass_header Set-Cookie;\n\t\tfastcgi_no_cache \$no_cache;\n\t\tfastcgi_cache_bypass \$no_cache;\n\t\tfastcgi_pass_header Cookie;\n\t\tfastcgi_ignore_headers Cache-Control Expires Set-Cookie;\n\t\tfastcgi_pass unix:\/var\/run\/php5-fpm.sock;\n\t\tfastcgi_index index.php;\n\t\tinclude fastcgi_params;\n\t}\n\tlocation \/ {/" /etc/nginx/sites-available/default
echo "See your default nginx file..."
cat -n /etc/nginx/sites-available/default
echo "Restarting the services..."
service nginx restart
service mysql restart
service php5-fpm restart
echo " "
echo "Configuring the database..."
mysql -uroot -p$MYSQLPASS -e "create database ${MYSQLDATABASE}"
cd /usr/share/nginx/html
wget http://wordpress.org/latest.tar.gz && tar -xvzf latest.tar.gz
mv /usr/share/nginx/html/wordpress/* /usr/share/nginx/html/
sudo chown root:www-data /usr/share/nginx/html/
rm -rf wordpress latest.tar.gz
echo "Manually configure wp-config.php file..."
cd /usr/share/nginx/html/wp-content/plugins
echo "Downloading W3 Total Cache"
wget https://downloads.wordpress.org/plugin/w3-total-cache.0.9.4.1.zip
apt-get install unzip -y
unzip w3-total-cache.0.9.4.1.zip
rm w3-total-cache.0.9.4.1.zip
echo "Downloading Redirection"
wget https://downloads.wordpress.org/plugin/redirection.2.3.15.zip
unzip redirection.2.3.15.zip
rm redirection.2.3.15.zip
echo "Downloading Header Footer"
wget https://downloads.wordpress.org/plugin/header-footer.zip
unzip header-footer.zip
rm header-footer.zip
echo "Downloading WordPress SEO"
wget https://downloads.wordpress.org/plugin/wordpress-seo.2.1.1.zip
unzip wordpress-seo.2.1.1.zip
rm wordpress-seo.2.1.1.zip
echo "====Activate the Plugins manually===="
echo "Here are the Plugins installed"
ls -al
echo "Now exiting the process"
# Terminate our shell script with success message
exit 0

Tagged With wordpress nginx microcache

This Article Has Been Shared 137 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to WordPress Auto Install Script (Nginx Microcache and Plugins)

  • Cloud Computing 3D Rendering And Scope In Film Industry

    Cloud Computing 3D Rendering Has Definite Scope in Film Industry which might alarm the Stars of tomorrow and relieve the Producers investing in the Films.

  • How Cloud Computing Challenge The Networks

    How Cloud Computing Challenge Networks with virtually unlimited storage and computing capacity, reduced cost and maximum flexibility and massive data traffic.

  • PubSubHubbub and Rackspace Cloud Queue

    PubSubHubbub is a networking protocol. Rackspace is Open Source but infamous for difficult to understand API documentation by normal human.

  • How to Upload Backup to Dropbox from Cloud Server

    Here is How to Upload Backup to Dropbox from Cloud Server in Case You Want To Keep Your Backup of Files and Database on a Free Cloud Storage.

  • Install Nginx PHP5-FPM on HP Cloud

    Here is How To Install Nginx PHP5-FPM on HP Cloud. HP Cloud means HP Helion Public Cloud. It is basically very easy to work with HP Cloud. People fear HP Helion Public Cloud very much. The basic reason possibly is not understanding the basics of Security Group Rules. So, you need to read our previous […]

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023
  • Advantages of Cloud Server Over Dedicated Server for Hosting WordPress March 26, 2023
  • Get Audiophile-Grade Music on Your Smartphone March 25, 2023
  • Simple Windows Security and Privacy Checklist for 2023 March 24, 2023
  • 7 Best Artificial Intelligence (AI) Software March 24, 2023

About This Article

Cite this article as: Abhishek Ghosh, "WordPress Auto Install Script (Nginx Microcache and Plugins)," in The Customize Windows, May 13, 2015, March 28, 2023, https://thecustomizewindows.com/2015/05/wordpress-auto-install-script-nginx-microcache-and-plugins/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT