Computing Environment Aides

From Wiki

Jump to: navigation, search

Contents


Back to Main Page


MediaWiki stores information in two main places: Files (created at MediaWiki installation and files created by installing extensions) & in its database. The File structure is built in the directory that you install MediaWiki. The main file you will edit is LocalSettings.php. Take caution when editing other files and make sure that others do not warn of changes being lost during upgrades. When installing extensions, you will make the most use of the /Extensions/ directory. Go here to learn more about the database structure.


Wiki Backup

Wikis have both a database and file structure to backup. The file structure is located in directory where you installed MediaWiki. To backup your database, it is best to do a mysqldump in order to place the database into a single file that can later recreate your database if needed. Backups only save your wiki's content up to that point so it is important to backup your wiki periodically to remain up to date.

To create an .sql file for backup from the terminal:

shell> mysqldump -u user -ppassword database_name > backupfile.sql

To restore a dump:

shell> mysql -u user -ppassword database_name < backup-file.sql

or if a database is not already created, do this first:

shell> mysqladmin create database_name

Source

See more MediaWiki help here: http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki

SQL Databases

Creating a database is very easy. Here are some instructions. If you want to have a database prefix, this must be configured at the initial installation. If this is not done, they will have to be manually changed later - changing the setting in LocalSettings.php does not do this (http://www.mediawiki.org/wiki/Manual:$wgDBprefix).

Here is a SiteGround SQL Tutorial.

Learn how to run an SQL query in the terminal.

SSH

SSH access is only available for SiteGround accounts with Virtual Private Servers (VPS). If an account does have VPS, follow these instructions to activate SSH.

File Transfers over SiteGround

SiteGround offers these FTP applications that must be downloaded. I use cyberduck and once this application is downloaded, just start it up, open a connection, and fill in the fields with the provided information Siteground provides. This can be found in the ftp accounts section, under "configure FTP client" for the user of your choice.

Personal tools