Using MediaWiki for organizing your personal website

From Rasmapedia
Revision as of 22:06, 27 September 2020 by Rasmusen p1vaim (talk | contribs)
Jump to navigation Jump to search

How can I insert images?

Insert $wgRawHtml = true; into the file LocalSettings.php in your main MediaWiki directory and the wiki will allow you to insert raw unchecked HTML. However, you must embed your html within the

<html> </html> 

tags so that MediaWiki can differentiate it. You can then use the HTML tags for images to insert images that are already uploaded on the web somewhere.

To upload images and other files into mediawiki in your own wiki website, they tell you to insert in php.ini:
file_uploads = On
The documentation doesn't tell you where php.ini is, tho, so that's useless advice. From the site,, I found you can create a script file with three lines of commands in it, upload that to your wiki installation. run it from your browser, and that will give you some information that is supposed to be helpful but isn't. My file ran fine, but it said the file was in the path /etc/php72, which means it is on a directory I am not allowed to write on given that I use a server. So, in the end, I just can't enable wikimedia to do uploads, I think.

Add the following entry to LocalSettings.php file in order to open external links in a new window / tab.

$wgExternalLinkTarget = '_blank';

I asked about this at hte help desk.$wgExternalLinkTarget#Can_internal_links_be_made_to_open_in_new_windows%3F

How can I indent paragraphs?

Create a new page in your wiki called MediaWiki:Common.css. On my wiki, its address is
That page should consist of the CSS HTML command P { text-indent: 2em } Put Mediawiki:common.css on your main page, or wherever you want to use for your administrator page so you can easily find it again.

How can I insert a divider line? Use 4 dashes

How can I stop viewers from editing my pages?

$wgGroupPermissions['*']['edit'] = false; #anonymous users cannot edit

$wgGroupPermissions['*']['createaccount'] = false; #no new self-registered users

How can I put in a comment?

<!-- This is a comment -->

How can I add to the editing menu so I can do quotations and make quotations be indented with a smaller font?

Use a "template" for this. A template is a file like Template:Quotation that is a page on your wiki. Once you create a page that starts "Template:xxxx", whenever a page on your wiki has the command Template:Xxx, the phrase "here is some text" will be formatted according to whatever commands are on the Template:xxxx page.


for multipline preformatted text.


 {{Quotation| }}  

at the end of each page, so you can easily cut and paste it to insert a quotation.