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.
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:
- Download the MediaWiki installation .tar.gz file at https://www.mediawiki.org/wiki/Download to your local computer.
- Use FTP or SCP to upload the .tar.gz file to your A2 Hosting account.
- Log in to your account using SSH, and then change to the directory where you uploaded the .tar.gz file.
- 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
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.
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.
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.
- At the LocalSettings.php not found page, click set up the wiki.
- Select the language you want, and then click Continue.
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.
- On the Connect to database page, under Database type, click MySQL.
- Confirm that the Database host text box is set to localhost.
- In the Database name text box, type the name of the database you created in step 6.
- If you want to use a database table prefix, type it in the Database table prefix text box.
- In the Database username text box, type the name of the database user you created in step 6.
- In the Database password text box, type the password for the database user you created in step 6.
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.
- On the Database settings page, select the settings you want, and then click Continue.
- On the Name page, type a name for your wiki.
- Under Administrator account, fill in the text boxes to create an account.
- Click Ask me more questions, and then click Continue.
- On the Options page, select the settings you want, as well as any extensions you want to install, and then click Continue.
- On the Install page, click Continue.
- When the installation process finishes, click Continue. The Complete! page appears.
- Save the LocalSettings.php file on your local computer.
- Use FTP or SCP to upload the LocalSettings.php file to the directory where you installed MediaWiki.
- On the Complete! page, click enter your wiki. The wiki's main page appears.
- Click Log in to log in to the wiki, and then use the username and password that you specified in step 20.
For more information about MediaWiki, please visit https://www.mediawiki.org.