== Historical context ==
Hoping to support our glorious volunteer Gvf who has been hosting wiki.wikimedia.it for free (as in beer and as in freedom) at his own expense for years and who always asked for some help in solving many problems,
In order to do {T268515} it would be optimal to be able to create databases, but in the current server we have not that privilege.
Since we are trying to **support** the epic volunteer who hosts this site since years, and since we do not want to fill Gvf with things to do, a reasonable thing to do is to try to make an initial transfer from that volunteer's server to the Wikimedia Italia's server called `intreccio`, so there are 0% possibilities to create more unwanted workload for him.
== Wiki migration and upgrade ==
The webmaster in charge (`eme`) of basic interventions on the server `intreccio` suggested that server for this migration, since its CPU load is usually ~0.12.
This migration is absolutely not destructive. When concluded, we can just do a DNS change.
Now we will notify the WMIT tech list by saying not to try to update wiki.wikimedia.it, since we are already doing this elsewhere.
[X] do a first transfer of everything on another server (`wmit-intreccio`)
[X] run `update.php` successfully to 1.35 T268515
[X] drop the Lockdown extension and migrate to `$wgWhitelistReadRegexp`
[X] successfully fix of {T306587}
[X] successfully adoption of extension Echo
[X] successfully adoption of extension Thanks T270148
[X] successfully adoption of extension Graph T311179
[X] update all extensions (breaking changes: WikiEditor, PdfHandler, Cite ..)
[X] install VisualEditor
[X] adopt VisualEditor with loopback "http" requests instead of "https"
[X] test of known VisualEditor potential issues T270456
[X] when not logged-in, `/rest.php/asd.wiki.wikimedia.it/v3/page/html/Associazione%3AFLCG/749841` gives `403` `rest-read-denied`
[X] successfully upload file with weird accents T269237
[X] @dario.crespi.wmit is happy
[X] deploy DNS `asd.wiki.wikimedia.it` pointing to `intreccio.wikimedia.it.` to allow everyone to test (by M/)
[X] start test period
[ ] announce the final migration
[ ] put the legacy wiki in read-only mode
[ ] final database migration from production
[ ] final database upgrade
[ ] DNS change
== Notes ==
Proposed `$wgWhitelistReadRegexp`:
```
name=LocalSettings.php
<?php
...
$wgWhitelistReadRegexp = [
'/^[^:]*$/', // main namespace
'/^Categoria:/', // Category:
'/^Category:/', // Category:
'/^File:/', // File:
'/^Template:/', // Template
'/^Utente:/', // User:
'/^User:/', // User:
'/^Speciale:PagineSpeciali$/',
// THESE CAN BE PROPOSED FOR ANON ABILITATION
// '/^Speciale:Ricerca/'
];
```
Proposed workaround for VisualEditor redirecting traffic:
```
name=LocalSettings.php
<?php
...
/**
* Fix VisualEditor loopback connections intended in http:// but redirecting to https://
*/
( function() use ( &$wgHooks, &$wgForceHTTPS ) {
$ip = $_SERVER['REMOTE_ADDR'] ?? null;
if( $ip && $ip === '127.0.0.1' ) {
$wgForceHTTPS = false;
$wgHooks['SessionMetadata'][] = function( $backend, &$metadata, $requests ) {
if( $backend->forceHTTPS() ) {
$backend->setForceHTTPS( false );
}
};
}
} )();
```
Notable Debian packages installed:
```
memcached
imagemagick
```
== How to Test ==
Thank you so much if you want to test this wiki before the final migration! If you want to try, visit this website:
https://asd.wiki.wikimedia.it
And manually accept the self-signed certificate.