Editing
Upgrading Mediawiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Procedure == <p class="alert alert-info">In the following instructions, `eb_deploy` refers to the shell script found in the `littled_wiki` project root. Note that `eb_deploy` is not the same thing as the command `eb deploy`. Use the shell script and not the `eb` command.</p> * Download new wiki distribution to `littled_wiki` project root. ** Unzip the archive. ** Make sure that all custom extensions listed in `LocalSettings.php` are present in the `extensions` folder of the new distribution. * Edit `eb_deploy`. ** Change `WIKI_DISTRO_DIR` to point to the directory containing the new wiki distribution. * Make backup of previous wiki configuration ** [[RDS_Database_Backup|Backup the current wiki database]]. ** Make sure to save a copy of the current `LocalSettings.php` for the wiki to migrate any custom settings to the new wiki distribution. * Run `eb_deploy`. * Connect to the wiki on the live server. ** Go through the installation steps to create `LocalSettings.php`. ** Download the newly created `LocalSettings.php` from the server to `[littled_wiki_PROJECT_ROOT]/wiki_config/` * Migrate settings from previous `LocalSettings.php` to the new file. ** Database settings, e.g. `$wgDBServer = getenv('MEDIAWIKI_DB_SERVER');` ** Do not store any sensitive information in the configuration file. ** Custom extensions which would be found at the very end of the file. === Upgrading the database === Some MediaWiki updates may require database updates especially related to specific MediaWiki extensions. In order to force the database to update, upload the boilerplate `LocalSettings.php` included in the MediaWiki distribution. When the wiki is next visited, it will prompt for a full configuration including user and database settings. After completing this set up, download the `LocalSettings.php` file and merge it with the previous working version. == Troubleshooting == === eb_deploy === ==== `/etc/letsencrypt` directory not found ==== '''Symptom:''' The following error is found after running `eb logs`: <syntaxhighlight lang="text"> 2022/08/20 16:01:24.558924 [INFO] nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/wiki.dbarchowsky.com/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/wiki.dbarchowsky.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /var/proxy/staging/nginx/nginx.conf test failed </syntaxhighlight> '''Resolution:''' Edit `/platform/nginx/conf.d/ssl.conf` and comment out the following lines: <syntaxhighlight> # Include the Elastic Beanstalk generated locations include conf.d/elasticbeanstalk/*.conf; </syntaxhighlight> Also comment out all keys with paths as values, e.g. `ssl_certificate`, `ssl_certificate_key`, `include`, `ssl_dhparam` Re-run `eb_deploy` locally. === Extensions === ==== BacktickCode ==== Enabling the BacktickCode extension in `LocalSettings.php` causes a 500 error. Search for "Mediawiki backtick" will point to [https://www.mediawiki.org/wiki/Extension:BacktickCode this page]. The information on that page is out of date. The current version of Mediawiki loads extensions with `wfLoadExtension()` not `$wgHooks`. Make sure the code for BacktickCode uses a class named `BacktickCode` and not `$wgHooks`. Also, the current Mediawiki distribution requires an `extension.json` file in the extension directory. The directory without this file will result in a 500 error. If the BacktickCode extension is causing 500 errors, it can be disabled by commenting out the `wfLoadExtension('BacktickCode')` call in `LocalSettings.php`. ==== AWS ==== See [[Storing Mediawiki Resources on AWS S3]]. The AWS extension requires a `composer.local.json` file in the Mediawiki web root that includes `composer.json` found within the AWS extension folder. This `composer.local.json` must be copied into the MW distro root before running `./eb_deploy`. [[Category:MediaWiki]]
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information