Migrating from Lightsail to EC2
-
Hi there,
I’ve deployed a WordPress application with AWS LightsailOld Site – Lightsail
WordPress version: 5.7.2
MySQL Version: 8.0.20
PHP Version: 7.3.18New Site – Testing locally with Docker Compose
WordPress version: 5.7.2
MySQL Version: 8.0.25
PHP Version: 7.4 (also tried with 8.0)I was able to Export the data from the old website with AIO WP Migration plugin to backcup.wpress (260M).
I configured the memory_limits in
/var/www/html/.htaccess
to# BEGIN WordPress RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress php_value upload_max_filesize 2000M php_value post_max_size 2100M php_value memory_limit 2100M php_value max_execution_time 600 php_value max_input_time 600
I installed the All-in-One WP Migration plugin v7.44 on the new website and attempted to Import my backcup.wpress (260M) file.
The result –
Restoring database...
stuck on 91%, if I try multiple times (on a fresh new website each time) I sometimes get to 93%, but that’s it. I even got once toDone restoring database
, but it was still stuck with a forever spinning snipper.Logs of the WordPress server (a lot of them)
[Sat Jun 19 20:29:19.036912 2021] [php7:error] [pid 59] [client 172.28.0.1:52768] PHP Fatal error: Allowed memory size of 2202009600 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/wp-includes/wp-db.php on line 1370, referer: https://mysite:8000/wp-admin/admin.php?page=ai1wm_import
I’m trying to test everything locally with Docker Compose, here’s my docker-compose.yml
version: "3.9" services: db: image: mysql/mysql-server:8.0.25 volumes: - db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: - db image: wordpress:5.7.2-php7.4 # Also tried with php8.0 volumes: - wordpress_data:/var/www/html - ./.htaccess:/var/www/html/.htaccess ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress WORDPRESS_DB_NAME: wordpress WORDPRESS_DB_CHARSET: utf8 volumes: db_data: {} wordpress_data: {}
Any suggestions on how to fix this? I’ve tried playing with values in
.htaccess
with not luck.Also important to mention, I have to delete the new WordPress website when it gets stuck during the Import process. Seems like the whole website gets corrupted and the server is not responding anymore, even after a restart.
- The topic ‘Migrating from Lightsail to EC2’ is closed to new replies.