beckn / beckn-ui-workspace

Mono Repo for Beckn UI Workspace
9 stars 12 forks source link

Setup New WordPress EC2 Instances #2460

Open emmayank opened 4 hours ago

emmayank commented 4 hours ago

Description

Set up new WordPress EC2 instances to host a WordPress website. This task involves configuring the necessary EC2 infrastructure, installing WordPress, and ensuring that all services (e.g., web server, database) are correctly configured and optimized for performance. The instance should be properly secured, and essential plugins should be installed to ensure the WordPress site runs smoothly.

Goals

Expected Outcome

Acceptance Criteria

Mockups / Wireframes

NA

Product Name

WordPress Hosting

Domain

Web Hosting / EC2 Infrastructure

Tech Skills Needed

Complexity

Medium

Category

Server Setup

Sub Category

WordPress Hosting

Project View

WordPress EC2 Setup

Project Name

New WordPress EC2 Instances Setup

prasad-takale-eminds commented 2 hours ago

We’ve successfully deployed WordPress for the BNZ team and provided support to fine-tune and resolve WordPress-related issues. Additionally, we set up WordPress on AWS Lightsail and adjusted the EC2 instance size from t2.medium to t2.large to enhance performance.

Below is the error message and steps to fix this.

[Fri Oct 18 07:59:46.937714 2024] [php:error] [pid 672:tid 672] [client 49.36.51.96:0] PHP Fatal error:  Uncaught RedisCachePro\\Exceptions\\PhpRedisMissingException: Object Cache Pro requires the redis PHP extension. The PhpRedis extension is not loaded in this environment (apache2handler). If it was installed, be sure to load the extension in your php.ini and to restart your PHP and web server processes. in /var/www/html/wp-content/plugins/object-cache-pro/src/Connectors/PhpRedisConnector.php:62\nStack trace:\n#0 /var/www/html/wp-content/plugins/object-cache-pro/src/Configuration/Configuration.php(716): RedisCachePro\\Connectors\\PhpRedisConnector::boot()\n#1 /var/www/html/wp-content/plugins/object-cache-pro/src/Configuration/Configuration.php(653): RedisCachePro\\Configuration\\Configuration->setClient('PhpRedis')\n#2 /var/www/html/wp-content/plugins/object-cache-pro/src/Configuration/Configuration.php(605): RedisCachePro\\Configuration\\Configuration::fromArray(Array)\n#3 /var/www/html/wp-content/plugins/object-cache-pro/src/Configuration/Configuration.php(626): RedisCachePro\\Configuration\\Configuration::from(Array)\n#4 /var/www/html/wp-content/plugins/object-cache-pro/src/Plugin.php(109): RedisCachePro\\Configuration\\Configuration::safelyFrom(Array)\n#5 /var/www/html/wp-content/plugins/object-cache-pro/object-cache-pro.php(54): RedisCachePro\\Plugin::boot()\n#6 /var/www/html/wp-includes/class-wp-hook.php(324): {closure}('')\n#7 /var/www/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(Object(Make_Column_Clickable_Elementor), Array)\n#8 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)\n#9 /var/www/html/wp-settings.php(555): do_action('plugins_loaded')\n#10 /var/www/html/wp-config.php(117): require_once('/var/www/html/w...')\n#11 /var/www/html/wp-load.php(50): require_once('/var/www/html/w...')\n#12 /var/www/html/wp-blog-header.php(13): require_once('/var/www/html/w...')\n#13 /var/www/html/index.php(17): require('/var/www/html/w...')\n#14 {main}\n  thrown in /var/www/html/wp-content/plugins/object-cache-pro/src/Connectors/PhpRedisConnector.php on line 62

The solution to fix the above error is to execute the below command inside the docker container.

pecl install --force redis
docker-php-ext-enable redis.so

Also, we have increased the PHP memory size and upload limit in the config file.

prasad-takale-eminds commented 2 hours ago

After the event, we have downgraded the EC2 instances size to t2.medium