Server

Keeping Servers Up-to-Date

Centos As new file patches come out, Centos will need to be updated. Run the following commands to bring the server and its extensions up-to-date: Occasionally you may get this message: There are unfinished transactions remaining. You might consider running yum-complete-transaction, or “yum-complete-transaction –cleanup-only” and “yum history redo last”, first to finish them. If those…

Backup with CRON

Below is the code added to 192.168.254.246 to back up all the files in the /var/www/marketing/ directory,. It is set to run every day at 1am and saves a zip file with the current date into the /backup directory: This command has been added using crontab -e (vim commands needed here). After making changes, be…

SELinux (Security-Enhanced Linux)

After a bit of trouble-shooting, I discovered that, while Apache may have permission to read/write according to the file permissions above, an additional set of commands need to be run to have Linux verify that Apache really does have those permissions: if the above doesn’t work, you may need to specify certain files/dirs. Health Check…

MySQL

Since SHA-256 password hashing is used by default since version 8 of MySQL, we run into a problem if users created with this encryption are attempted with a WordPress install. Below are the commands for creating a user with the native password setup (1 create user, 2 create database, 3 give user access to database,…

SSL using LetsEncrypt

Letsencrypt is what we use to generate our SSL certificates (allows for HTTPS usage). Below are instructions using certbot to generate your certificates. Generating Certificates Each domain has a line as -d domain.com within the command. You can add more domains by simply adding a listing in that format and executing the command all at…

File Permissions

Occasionally, WP will have a conniption over file permissions and user/group assignments. The commands below will fix those permissions. For Centos: For Ubuntu: For Mac: or: