Page MenuHomePhabricator

Migrate www.wikimedia.it into the wmi-fabula server
Closed, ResolvedPublic

Description

Preamble

Soon additional notes.

Intervention

Migrate this WordPress website:

Back into the fabula.wikimedia.it server.

Soon additional notes.

Deployment train

Time in CEST:

  • 2021-02-26 - Wikimedia Italia asks FTP credentials to the provider
  • 2021-03-02 09:36 - Wikimedia Italia obtains valid FTP credentials by the provider
  • 2021-03-02 13:01 - start downloading upstream files via FTP
  • 2021-03-02 13:01 - somehow download the SQL dump (we have not an official phpMyAdmin/webmin panel)
  • 2021-03-02 18:30 - estimated end of downloads
  • 2021-03-02 21:30 - start setup environment in the server
  • 2021-03-02 23:30 - estimated end setup environment in the server
  • 2021-03-02 23:31 - tests
  • 2021-03-03 09:00 - estimated DNS switch
  • 2021-03-03 09:01 - deploy new Let's Encrypt certificate
  • 2021-03-03 13:00 - tests
  • 2021-03-03 18:00 - Champagne!
IMPORTANT: During this migration the website must be considered in read-only mode.
NOTE: Apologies if between 09:00 and 18:00 I'm not available as volunteer but in my lunch break. Anyway I will try to give an eye on the FTP download to keep it active. Also apologies if after 21:30 I'm not available but I have a call.
WARNING: I've double-checked my inventory and I have no champagne. Please bring your own champagne.

Event Timeline

valerio.bozzolan updated the task description. (Show Details)
valerio.bozzolan updated the task description. (Show Details)

somehow download the SQL dump

If you only have FTP access, I'll guess you need to change the PHP files so that some hook launched a DB dump? But will it finish within the timeout? It might also be enough to use the XML export, which should carry all (text) content but may miss some configuration. That might be easier to import back into the existing installation too. (The existing installation had some draft or recent articles which were not migrated to the non-WMI installation.)

somehow download the SQL dump

If you only have FTP access, I'll guess you need to change the PHP files so that some hook launched a DB dump? But will it finish within the timeout? It might also be enough to use the XML export, which should carry all (text) content but may miss some configuration. That might be easier to import back into the existing installation too. (The existing installation had some draft or recent articles which were not migrated to the non-WMI installation.)

Yup. Here we go:

very-omissis-name.php
<?php
exec( "mysqldump --user=omissis --password=omissis --host=localhost DB_NAME > very-secret-omissis-very-long-very-wow-very-omissis-and-secret-really-trust-me-its-omissis.sql" );

asd

FYI, some issues I encountered:

$ mysql WMDB < WMDB.sql
ERROR 1273 (HY000) at line 30: Unknown collation: 'utf8mb4_unicode_520_ci'
$ sed -i 's/utf8mb4_unicode_520_ci/utf8mb4_unicode_ci/g' WMIDB.sql
$ mysql WMDB < WMDB.sql
ERROR 1273 (HY000) at line 17983: Unknown collation: 'utf8mb4_0900_ai_ci'
$ sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' WMIDB.sql
$ mysql WMDB < WMDB.sql
ERROR 1153 (08S01) at line 139970: Got a packet bigger than 'max_allowed_packet' bytes

So also increased max_allowed_packet from 1M to 16M for this session:

$ mysql
$  SELECT @@GLOBAL.max_allowed_packet;
+-----------------------------+
| @@GLOBAL.max_allowed_packet |
+-----------------------------+
|                     1048576 |
+-----------------------------+
1 row in set (0.00 sec)

$ SET GLOBAL max_allowed_packet=16777216;

Everyone could try the website locally with:

/etc/hosts
# WMI Migration
# TODO: remove
# https://phabricator.wikimedia.org/T276206
# fabula.wikimedia.it
54.38.36.173 www.wikimedia.it

Hey, it's blazing fast now.

In the meanwhile I'm also disabling some unused features for additional hardening and speedup.

For example, these plugins were just disabled because they are not in use. Confirmed by Erica Pedone. Here the list:

  • Add-On PayPal Standard di Gravity Forms
  • Gravity Forms
valerio.bozzolan moved this task from In progress to Recent changes on the WMIT-Infrastructure board.

In the meanwhile I've dropped some unused plugins:

  • Add-On PayPal Standard di Gravity Forms
  • All In One SEO Pack
  • Gravity Forms
  • Gravity Forms Event Tracking
  • Hello Dolly
  • Konte Addons
  • Really Simple SSL
  • Slider Revolution
  • WPBakery Page Builder
  • Yoast SEO

It still works. asd