Installing Mediawiki with Let’s Encrypt SSL Certificate Part 2

This is Part 2 of the Mediawiki with Let’s Encrypt SSL Certificate installation guide. In part one we covered the prerequisite OS portion of the installation which detailed the core components of Mediawiki. In addition to the core components, we installed support software for Mediawiki which will assure a successful installation. Image processing software is installed as well as caching software and further wiki functionality.

At the end of Part 1 a preview of this portion of this part of the installation was hinted at. If you pointed your browser at your server after installing the Mediawiki core (http[s]://your-site/mediawiki, you were presented with the following screen in your Edge or Mozilla or whatever browser.

Initial Mediawiki Installation Page

Go ahead and click the link, and you’ll be presented with the following page:

Make sure the language and Wiki language are set appropriately, then click continue.

This page performs a quick check of the environment and checks to make sure required components are installed. In most tutorials on the internet this is start of issues. We have sidestepped those issues by installing the additional Mediawiki software components as outlined in Part 1 so you should see no failures or missing tools. If you do see something missing, please review Part 1 of this installation guide and make sure you installed all software. Click continue.

On this page is where we will enter our MySQL details which we configured in Part 1 of this series. Make sure Database Host, Database Name, Database Username and Database Password are entered into their appropriate text boxes. Database Table Prefix is best left blank; unless you are running more one than ‘Wiki” on your server. That configuration is outside the scope of this document. Contact me directly if this is something you are interested in. Click continue.

On this page you choose the storage engine that the database will use. Leave it at default, and click continue.

Here you will enter the name of your Wiki. For project namespace leave it default unless you have a specific reason to change it. Under administrator account, enter the account you will use to log on to the wiki. Avoid using names like ‘admin’ or ‘administrator’ or even ‘root’. These are names hardcoded into exploit tools and it’s just best practice to use another naming scheme. I personally use first initial last name but choose what’s most memorable to you. Enter an email address where user issues and Mediawiki tools can contact you. At the bottom of the screen there are a couple of radio buttons indicating ‘Ask me more questions’ or ‘I’m bored already, just install the wiki.’ If you are familiar with wiki’s and KNOW their default operation, you might choose being bored. I highly recommend moving on to the next pages. If you choose to stop here, jump to the end of this guide to installing the ‘LocalSettings.php’ file.

I apologize for the quality of the above .png picture. It’s one of the longer installation pages. When you get to this portion of the installation, you are offered many enhancements and upgrades to the operation of your Wiki. I recommend choosing all the defaults unless there is a feature you know you’re going to need. You can always come back this at a later date and the ‘modules’ (all of the checkboxes on this page refer to enhancements of the Mediawiki base software which are installed as modules) extend Mediawiki functionality. Once complete, click continue.

This page lets you know you have come to the end of the question and answer section of the Mediawiki installation and you can click continue.

This is the most critical part of the installation. As long as all previous steps were complete, Mediawiki will now connect to the MySQL database and build all the tables which are at the heart of Mediawiki. You should see all ‘done’ and that final line should read ‘Mediawiki has been successfully installed’. At the bottom are links to enter your wiki. DO NOT click the link to enter your Wiki just yet. Click continue.

Installing the LocalSettings.php file

Okay, you’ve made it to the final page of the installation. If you’ve made it this far there’s just one final thing to do. You will have noticed your browser has started a download. The file just downloaded is ‘LocalSettings.php’ and needs to be uploaded to your server and placed in the directory /etc/mediawiki. This portion I do a little different. Open that file in Notepad or any text based editor. DO NOT open this file in a word processor, or your installation will fail. Once you have opened the file in a text editor, click ‘ctrl-a’ to select all text, and then click ‘ctrl-c’ to copy all text. Now get a terminal session (or Putty or whatever tool you use to connect to your server), and connect as the root user. Open up an editor on your Ubuntu server (nano or vi). Now paste all that text you’ve copied into that editor session. Save the file as /etc/mediawiki/LocalSettings.php. If this portion seems a bit complicated, then you can use your ftp client or which ever tool you use to transfer files to your Ubuntu server and upload the LocalSettings.php file to the /etc/mediawiki directory.

Once that is complete, click the link ‘enter your wiki.’

You will now be greeted by the following screen:

Your installation is now complete. You can login with the administrator username and password you entered in the Mediawiki admin user portion of the installation. The one where I mentioned to NOT use admin or administrator as the username.

That’s it, you now have a fully working Wiki. If your installation went different, or your stuck somewhere, throw me a comment with the details, and I’ll be more than happy in trying to assist where things went wrong.

If this guide helped you to install Mediawiki, or assisted in anyway, why not click that cup of coffee down in the bottom right corner and show your appreciation.

Please visit my Patreon page if you’re so inclined or make a donation. Or you can click the coffee cup in the bottom right corner of the screen and Buy Me A Coffee. Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *