This will install Mediawiki in Lightsail. I’m assuming you already setup SSH, and LAMP. Otherwise read my previous posts.
Mediawiki
Useful apt packages
The configuration is at /etc/php/7.0/apache2/php.ini. We don’t need to change anything now.
Install fastcgi
Enable Apache modules proxy, proxy_http, and rewrite. Then restart Apache.
If you ever need to edit the Apache configuration, it is at /etc/apache2/apache2.conf.
Possibly you’ve seen Perl bitterly complaining that its language is not configured. It doesn’t really matter, but you can solve it adding this to ~/.bashrc:
See that LocalSettings.php points to the database and has the correct password.
Decompress the mediawiki distribution in the directory /var/www/wikijano (replace wikijano for whatever you see fit).
Replace DocumentRoot /var/www/html with DocumentRoot /var/www/wikijano
Restart Apache with sudo systemctl restart apache2.
Now open the domain in your browser. Mediawiki will initiate the configuration through a web interface. You will need the password you installed MySQL with. Once you are done the server will produce a file LocalSettings.php. To complete the installation you have to copy this file to /var/www/wikijano/LocalSettings.php. You can do this with Transmit, scp, rsync, or copy paste through the clipboard.
At this point your mediawiki should be up and running.
Change upload file size limit
Add the following to /var/www/notes/LocalSettings.php
Add the following to /etc/php/7.0/apache2/php.ini
Restart Apache2
Good to know
How to reset MySQL password
Run this SQL. Replace SECRET with your own password.