Skip to content

Scripts for simplified installation, maintainance and deletion of Wordpress sites

License

Notifications You must be signed in to change notification settings

Y-sektionen/wpManySiteAdmin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wpManySiteAdmin

Scripts for simplified installation, update, monitoring and deletion of Wordpress sites. Each site is after installation automatically upgraded through minor updates and scanned for vulnerabilities using wp-scan and ssl-labs-scan.

Note: The default installation installs the Active Directory (AD) plugin for Wordpress since AD is commonly used at LiU for user data. This readme does NOT cover AD-plugin configuration since that's specific to each domain.

License

CYD-poolen - wp-cli - Scripts for simplified installation, maintaining and
deletion of Wordpress sites. Copyright (C) 2014,2015 CYD-poolen, Linköping University.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Installing requirements

These scripts are dependent on these components

  • php7.3-fpm
  • nginx
  • mysql
  • wp-cli
  • go
  • ruby

To install most dependencies on Debian Stable:

sudo apt install php7.3-cli php7.3-fpm nginx mariadb-server php7.3-mysql ruby ruby-dev libcurl4-gnutls-dev make golang bundler ruby-ffi zlib1g-dev php7.3-curl

wp-cli

Install wp-cli from the project Github page (preferable using .deb-package), https://github.com/wp-cli/wp-cli/wiki/Alternative-Install-Methods.

sudo dpkg -i FILE.deb

Installation

Clone this repo:

git clone --recursive https://github.com/CYD-poolen/wpManySiteAdmin
cd wpManySiteAdmin

Complete the installation of wp-scan:

gem install wpscan

Let's encrypt

Install and run certbot according to the instructions at certbot.eff.org

Configuration

Copy the example configuration file.

cd ../..
cp conf.example conf

Enter your desired admin user name, admin user email and basepath for your WP-sites.

editor conf
# User info for admin user in WP-installs
adminUser=admin
adminMail=admin@example.com

# Basepaths for WP-installs, WP is installed to $basePath/$userName
basePath=/srv

Add the update script to roots crontab:

sudo crontab -e

Add this line to check for update once a day:

min hour * * * /PATH/TO/PROJECT/DIR/update/updateWP.bash

Installing a Wordpress site

Run the script installWP.bash with username and fully qualified domain name (FQDN) as arguments. IMPORTANT! The FQDN must be correctly configured and pointing to the host that's running the script.

sudo ./installWP.bash USER FQDN

The script will output the MySQL and system password for your chosen user. It will also output a password for the Wordpress admin user chosen in the config file.

Add the username for the site to the list of userNames in config file:

# Site name = user name that executes the site.
userNames="org1 org2"

About

Scripts for simplified installation, maintainance and deletion of Wordpress sites

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%