DEV Community

Cover image for WordPress Automation with Custom AMI
Mihir
Mihir

Posted on • Edited on

WordPress Automation with Custom AMI

Overview

WordPress Automation with Custom AMI

Steps

  1. Launch the free tier Amazon Linux 2 and Connect to the instance using Instance Connect (Enable SSH/22 & HTTP/80 from anywhere IPv4)

  2. Create authentication variables necessary for WordPress Database

  3. Install Apache HTTPD, MariaDB and PHP dependencies Code

  4. Set the services to enable during boot and start the service

  5. Set Mariadb Root Password

  6. Install latest version for WordPress

  7. Configure WordPress to follow the authentication variables set during step 2 and change the owner permissions for the files Code

  8. Create the Wordpress Database

  9. Go to http://public_ipv4_address to ensure WordPress installation

  10. Create a banner using cowsay

  11. Inside the 40-cow file insert commands

  12. Change permissions for the file to be read and executed by everyone Code

  13. Apply update

  14. Reboot and ensure the banner and final WordPress application

  15. Stop the instance and Create an image from the Stopped Instance

    • Name: WordPressAMIAutomation
    • Create Image
  16. Ensure Snapshot and AMI creation.

  17. Launch a custom instance from the WordPressAMIAutomation AMI

  18. Configuration wizard allows hardware changes for custom VPC, harddisk space and advanced configuration such as security group configuration

    • Reference: Configuration Wizard
  19. Login instance using Instance Connect

    • Reference:Banner
  20. Go to http://public_ipv4_address to ensure WordPress automated installation.

    • Reference: Image description

Top comments (0)