Wordpress with phpmyadmin on LAMP Stack

This document is working for Wordpress using the LAMP stack.

AWS-Marketplace

Wordpress on Ubuntu 22.04 with phpMyadmin

Usage Instructions

Note:

Before you start to access the system, please ensure the status of the instancein the AWS Console turns to Green, or the initialization process might be interrupted and the software configuration fails. It takes about 1-3 mins.

Note:

The default security group opens ports 22, 80, and 443 and allows access from all IP addresses. When you start the instance for the first time, we strongly recommend that you set port 80 to be accessible only to your own IP address to complete the initial installation of WordPress.

How to use

1.Access the application via web browser at http://instance-ip/

2.Select the language and complete the final user information,click install.

1

2

3.After install success,You can log in using the username and password you just created

3

4

4.Access the phpmyadmin via web browser at http://instance-public-ip/phpmyadmin ,and use ‘root’ as username and ‘instance-id’ as password.

Optional:

  • 1.The software version is not unified due to early deployment issues. Please refer to the description of the specific ami page.

  • 2.software configuration:

  •  For CentOS/Rocky Linux
         Apache2: /etc/httpd/
         MySQL: /etc/my.cnf
         PHP: /etc/php.ini
         phpMyAdmin: /etc/httpd/
                     /usr/share/phpmyadmin/config.inc.php
         
         How to status/start/stop service: systemctl status/start/stop nginx php-fpm mysqld
    
     For Ubuntu/Debian Linux:
         Apache2: /etc/apache2/sites-enabled/000-default.conf
         MySQL: /etc/mysql/mysql.conf.d/mysqld.cnf
         PHP: /etc/php/8.3/cli/php.ini
         phpMyAdmin: /etc/apache2/conf-available/phpmyadmin.conf
                     /usr/share/phpmyadmin/config.inc.php
         How to status/start/stop service: systemctl status/start/stop nginx php8.3-fpm  mysql
         
         It is worth noting that the PHP version is not the same in the Debian and Ubuntu ami. 
         Please refer to the specific ami version for modification.
    
  • 3.How to Generate and Install a Let’s Encrypt SSL Certificate for apche?

    Note:

    This is not suit for Wordpress on Ubuntu 22.04 with phpMyadmin AMI.
    
     This ami use certbot to get Let’s Encrypt certificates,it will automatically obtain the certificate
     and replace the default Apache configuration file which is in /etc/apache2/sites-available/000-
     default.conf.The new configuration file will redirect HTTP to HTTPS for both the IP address and the
     domain name.
     
     The scripts location: /var/www/scripts/cert_tool.sh
     Assumptions and prerequisites:
         You own one or more domain names.
         You have configured the domain name’s DNS record to point to the public IP address of your instance.
    
  • 4.After installing ssl certificate, webp file loading fails

    After testing, this situation will occur after installing the redis plugin first and then installing the ssl certificate. It will cause the URL configuration of wordpress to be unable to synchronize with the database.

    You need to stop using the redis plugin on the plugin page, and after observing that the URL option returns to domain, you can re-enable it.

    Yes, this ami also installed and enabled redis-server, with a maximum memory limit of 256MB.

    5

  • 5.EC2 instance IP changes after reboot

    You can use the script located at /var/www/scripts/update_wordpress_urls.sh to update the URL information in the wordpress database.If you have already configured HTTPS enabled, you only need to change the DNS record to point to new public ip.

    We recommend that you try not to restart the instance, or you can use elastic IP to prevent changes.

Support

If you encounter problems in the process of using the system, please contact us by email, thank you! support@fastimg.top