How to install MediaWiki manually

This article describes how to manually install the popular MediaWiki content platform on your A2 Hosting account.

If you have a shared, reseller, managed VPS, or managed Dedicated Server account, you can use Softaculous in cPanel to guide you through the MediaWiki installation process. For other account types, however, you must install MediaWiki manually.

Installing MediaWiki

MediaWiki is compatible with all A2 Hosting accounts.

Although A2 Hosting servers are compatible with a wide variety of software applications, we cannot provide troubleshooting assistance for application-specific issues.

To install MediaWiki manually, follow these steps:

  1. Download the MediaWiki installation .tar.gz file at https://www.mediawiki.org/wiki/Download to your local computer.
  2. Use FTP or SCP to upload the .tar.gz file to your A2 Hosting account.
  3. Log in to your account using SSH, and then change to the directory where you uploaded the .tar.gz file.
  4. Type the following command, replacing x.y.z with the version of the .tar.gz file you uploaded in step 2:
    tar xvzf mediawiki-x.y.z.tar.gz
  5. At the command prompt, type the following command, replacing x.y.z with the version of the .tar.gz file:

    cp -R mediawiki-x.y.z/. ~/public_html
    • This command assumes that you want to install MediaWiki in your account's document root directory. If you want to install MediaWiki in a subdirectory instead, add it to the destination path.
    • If you have an unmanaged product (such as an unmanaged VPS or Dedicated Server), your document root directory may be somewhere else, such as /var/www/html. Consult your Linux distribution's documentation for the document root directory location.
  6. Create a MySQL database and database user for MediaWiki. You will need this information during the web configuration process.

    • If your account includes cPanel, please see this article for information about how to create a MySQL database and user.
    • If your account does not include cPanel, you can create a MySQL database and user from the command line. For information about how to do this, please see this article.
  7. Use your web browser to go to the MediaWiki installation URL.

    If you copied the MediaWiki files to the document root directory in step 5, the installation URL is your domain name (for example, http://www.example.com). If you copied the MediaWiki files to a subdirectory in step 5, add the subdirectory's name to the URL.
  8. At the LocalSettings.php not found page, click set up the wiki.
  9. Select the language you want, and then click Continue.
  10. MediaWiki checks the installation environment:

    • In managed environments, no additional system configuration should be required. Click Continue.
    • In unmanaged environments, you may have to install some additional system components to meet the MediaWiki requirements.
  11. On the Connect to database page, under Database type, click MySQL.
  12. Confirm that the Database host text box is set to localhost.
  13. In the Database name text box, type the name of the database you created in step 6.
  14. If you want to use a database table prefix, type it in the Database table prefix text box.
  15. In the Database username text box, type the name of the database user you created in step 6.
  16. In the Database password text box, type the password for the database user you created in step 6.
  17. Click Continue.

    If MediaWiki cannot connect to the database, you receive a DB connection error message. Check the values you specified in steps 12 to 16, and then try again.
  18. On the Database settings page, select the settings you want, and then click Continue.
  19. On the Name page, type a name for your wiki.
  20. Under Administrator account, fill in the text boxes to create an account.
  21. Click Ask me more questions, and then click Continue.
  22. On the Options page, select the settings you want, as well as any extensions you want to install, and then click Continue.
  23. On the Install page, click Continue.
  24. When the installation process finishes, click Continue. The Complete! page appears.
  25. Save the LocalSettings.php file on your local computer.
  26. Use FTP or SCP to upload the LocalSettings.php file to the directory where you installed MediaWiki.
  27. On the Complete! page, click enter your wiki. The wiki's main page appears.
  28. Click Log in to log in to the wiki, and then use the username and password that you specified in step 20.

More Information

For more information about MediaWiki, please visit https://www.mediawiki.org.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.