CAPipedia Sandbox:Updating CAPipedia
Appearance
Test the new version deployment prior to upgrading in production
- Download and uncompress the new version's distribution from mediawiki.org
- Run the `refresh-sandbox.sh` script from the user home directory
- Replace the distribution files using the command: `cp -pR mediawiki-[version]/* sandbox.capmembers.wiki`
- From the `sandbox.capmembers.wiki` directory, run the command: `php maintenance/run.php update`
- Browse to https://sandbox.capmembers.wiki/wiki/Special:Version and verify the upgrade took effect and the page fully loads without errors
- Check that the following operations work as expected:
- Viewing pages
- Editing pages
- Uploading a file
Backup the production site
- Place production site in read only mode by uncommenting the `$wgReadOnly` variable in the `LocalSettings.php` file of the old directory
- Return to the user home directory
- Run `backup-prod.sh`
Create a new production site
- Duplicate the production folder using the command: `cp -pR capipedia-[old_version] capipedia-[new_version]`
- Replace the distribution files using the command: `cp -pR mediawiki-[version]/* capipedia-[new_version]`
- From the DreamHost Web Panel, browse to **Websites**/**MySQL Databases**
- Create a new database with a database name that matches the new directory name and new username of `cap_wiki_root`
- Upload the backup database file to the database by running the command: `mysql -ucap_wiki_root -p -hmysql.sandbox.capmembers.wiki [new_db_name] < [backup_sql_file]`
- Change the `$wgDBname` variable in the `LocalSettings.php` file of the new directory to the new database name
- From the new capipedia version directory, run the command: `php maintenance/run.php update`
Switch the production hostname to the new site
- From the DreamHost Web Panel, browse to **Websites**/**Manage Websites**/**Settings**/**Directories: Modify** and change the root web directory to the new version
- Wait for **Updating Web Options...** to complete
- Browse to https://sandbox.capmembers.wiki/wiki/Special:Version and verify the upgrade took effect and the page fully loads without errors
- Place production site back in write mode by commenting the `$wgReadOnly` variable in the `LocalSettings.php` file of the new directory
- Check that the following operations work as expected:
- Viewing pages
- Editing pages
- Uploading a file