laurenceshaw.net technical documents

Use of these resources represents your agreement to Australian © Copyright Laws and the general guidelines in our Terms of Use & Privacy Policy

These articles are not easy to follow and need IT skills to work through, but they show what must be done to use an EC2 instance with WordPress. No liability at all for use of this information.

Documents
date: 07 09 2021 bytes: 2285       axoncpn file: axoncpnAmazon-CDN-W3TotalCache.txt
date: 07 09 2021 bytes: 6258       axoncpn file: axoncpnAmazon-SES-Microsoft-Exchange.txt
date: 02 10 2021 bytes: 14536      axoncpn file: axoncpnAmazon_AWS_CDN_Configurations.txt
date: 07 09 2021 bytes: 14328      axoncpn file: axoncpnDR-Backups.txt
date: 07 09 2021 bytes: 27641      axoncpn file: axoncpnInstall-EC2-Linux2-Php74.txt
date: 07 09 2021 bytes: 31369      axoncpn file: axoncpnS3FS.txt
date: 09 09 2021 bytes: 6657       axoncpn file: axoncpnip2location_installation.txt

Notes

S3FS
One may install s3fs rather than using git and make:
sudo amazon-linux-extras install epel
sudo yum install s3fs-fuse

SQL
I have had a lot of phpMyAdmin failures when importing SQL backups/exports.
To resolve, one may export sets of tables into groups, rather than the whole database. For instance, WordFence can be omitted completely, and other plugins can be done in groups.
Some plugins are very popular but over the years we see how they introduce fatal errors on upgrades. Being aware of this helps.
For example, if WordPress keeps displaying the fatal error message, it may not be memory at all, but a plugin upgrade you once trusted.

PHP Version
Amazon Linux2 determines what the current supported level of PHP is. For example, while on PHP7.4 it may be entirely impossible to upgrade to PHP 8, as some components of the system has dependencies that will fail no matter what you try to do.

WordPress rebuilds or transfers (Applies to DR as well)
It may seem simple to do some rebuilds or transfers – that is, until they fail. Our suggestion is to have a development system, which can even be localhost – it may need 127.0.0.1 in the wp-config.php file. This way you can cut and paste widgets or menus that failed, lost CSS!, and so on. It is relatively easy with some experience to sift through a database with a good text editor, replacing localhost with your domain name before uploading to the live site. One still follows the principle of breaking the whole database up into groups. However, before these projects are executed, it is best to make an optimised version of the database so that an editor does not collapse under the strain of too large a file. (The original can still be backed up, including the whole database, and the groups of tables.)

Installing Positive SSL on some variant of Linux/Centos/Ubuntu etc.
There is no reason you cannot use any certificate service, such as CleanTalk to create and download a .key file, then paste that content into Comodo’s (Sertigo) certificate service which then forwards you either a collection of files, or a single .cert file and a bundle file.
The problem is what to do if you get a bunch of files. Whatever happens, you do not want the root chain in the certificate, and you do want a particular order in the certificate. Here is what we did for webrubble.com…
Make an backup copy of webrubble_com.crt, then edit webrubble_com.crt by appending the following contents:
Append SectigoRSADomainValidationSecureServerCA.crt
Append USERTrustRSAAAACA.crt
If you have received a bundle that only includes two paragraphs, (not three of four) you could append that to the .crt file instead.
That’s it! You now have the crt file. After installing SSL on the system – the ssl.conf module, and entries in httpd.conf and .htaccess, you can test the certificate for an A rating at https://www.ssllabs.com/ssltest/index.html. You do not want an A+ rating as that has some special conditions and could pose a risk you do not want to take.