WordPress
Installation - Summary
Here's how to stand up an all-in-one WordPress instance.
Substitute your server's subdomain and admin email in the echo
commands below.
After providing these defaults run the yum
commands as detailed below.
echo "" > /root/DEFAULT_SUB_DOMAIN.txtecho "myaddress@myemailprovider.com" > /root/DEFAULT_EMAIL_ADDRESS.txtyum -y install https://pbase-foundation.com/pbase-repo.rpmyum -y install pbase-preconfig-mysql-wordpressyum -y install pbase-wordpress-allinoneyum -y install pbase-lets-encrypt
Installation - Step by Step
Step 1: Provide your subdomain name and email address by creating a text files under the /root directory.
To serve the root domain:
echo "" > /root/DEFAULT_SUB_DOMAIN.txt
To serve a subdomain, for example 'blog':
echo "blog" > /root/DEFAULT_SUB_DOMAIN.txt
echo "myaddress@myemailprovider.com" > /root/DEFAULT_EMAIL_ADDRESS.txt
Step 2: Install the pbase-repo package with the command:
yum -y install https://pbase-foundation.com/pbase-repo.rpm
... when it runs, its output will point out the file pbase_repo.json that now holds copies of the defaults.
Step 3: Install the WordPress dependencies and pre-configuration package with the command:
yum -y install pbase-preconfig-postgres-wordpress
... it's output will tell you to review the files in the module-config.d directory.
Step 4: Install the pbase-wordpress package with the command:
yum -y install pbase-wordpress
Step 5: If your host is registered in DNS, installing the pbase-lets-encrypt package
will generate a certificate for HTTPS connections:
yum -y install pbase-lets-encrypt
Extras
You should secure your server ports with pbase-firewall-enable
and lock down SSH access with the pbase-ssh-fail2ban
package.
yum -y install pbase-ssh-fail2banyum -y install pbase-firewall-enable
Separate module by module install
Here are the steps to separately install the WordPress modules. Also shown is how to specify DEFAULT_SUB_DOMAIN to configure WordPress being served under a subdomain.
## provide email and specify subdomainecho "myaddress@myemailprovider.com" > /root/DEFAULT_EMAIL_ADDRESS.txtecho "blog" > /root/DEFAULT_SUB_DOMAIN.txt## preconfigyum -y install https://pbase-foundation.com/pbase-repo.rpmyum -y install pbase-preconfig-mysql-wordpress## apache and mysqlyum -y install pbase-apacheyum -y install pbase-mysql## optional - to add sample contentyum -y install vrl-repoyum -y install vrl-website-content## wordpressyum -y install pbase-wordpress## and if your domain is registered in DNSyum -y install pbase-lets-encrypt
Configuration Options
The pbase-preconfig-mysql-wordpress rpm provides three configuration files. Theses default configuration files enable PHP on the Apache server, creates a database called "wordpress" and set the base URI to "wordpress".
{"pbase_apache" : {"addSelfToEtcHosts": false,"addSecurityHeaders": true,"restrictHttpMethods": true,"useSitesEnabledConf": false,"enableIndexPhp": true,"serverAdmin": "yoursysadmin@yourrealmail.com"}}
{"pbase_mysql": [{"default": {"hostName": "localhost","rootPassword": "SHOmeddata","port": "3306","characterSet": "utf8mb4","startService": true,"install": true,"database": [{"name": "wordpress","user": "admin","password": "shomeddata"}]}}]}
{"pbase_wordpress": {"wordpressUriBase": ""}}
Source code of this RPM
This is the RPM .spec file containing the code that is executed by the pbase-wordpress-allinone installer. https://github.com/marklangbehn/pbase-rpm-installer/blob/master/applications/pbase-wordpress-allinone/rpmbuild/SPECS/pbase-wordpress-allinone.spec
More about WordPress
Visit the WordPress project at:
https://wordpress.org/
"WordPress is open source software you can use to create a beautiful website, blog, or app."
The scripts and dependencies of the pbase-wordpress rpm are based on the steps described in the Installing WordPress on your own Computer page:
https://wordpress.org/support/article/installing-wordpress-on-your-own-computer/