How I created a private wiki for my fantasy world-building

Last month I talked about how I balance the act of world-building while remaining focused on story (and how the two are interconnected).

Today I’m going to offer some more depth on the exact steps I took to set up a private wiki, for those fantasy writers in the crowd who want to create your own to up your game.

Think Wikipedia, but for your fantasy world

The software I used is the same one Wikipedia is built out of: MediaWiki. As a result, the pages I build look like and link together just like on Wikipedia. Except in my case, it’s private. I can click on Chrome (my browser of choice) and navigate to the domain that loads my wiki, just like visiting a website, then as soon as I log in I can click around my wiki. I can also add/modify however I need to. The information evolves as the story evolves, which is exactly the way I like it.

If you know how to navigate Wikipedia then you’ll be familiar with its organizational power. This is the same potential at your fingertips if you set up your own world-building wiki using MediaWiki. There are other wiki and world-building platforms, of course. I just chose MediaWiki because I read Wikipedia voraciously and it made sense to model my world-building notes after it. (Why reinvent the wheel, right?)

How to set up MediaWiki

Wiki pages are website pages, so if you want to create a wiki you need a website. This means you have a domain name and a host. For example, if you website is, the address “” is your domain name, and the host is a company you pay to save your web pages on their server, thus making them accessible to the public. When you create your wiki, its pages will be published on your host’s server as web pages under your domain.

I’ll be making two assumptions in what follows:

  • You, like me, are an author or aspiring writer and you’ve set up your platform with a website, i.e. you have paid for a custom domain like and have a hosting plan—and if not, then let this be your incentive to get cracking on that! (If this post makes you decide to do this and you want some guidance on all the steps to set up an effective author platform, including a great author website, take my free 10-day course on Highbrow, “How to market your book online”. You’ll get an email each day that takes about 5 minutes to read with the day’s steps for you to work on.)


  • You, like me, are using as your host. There are other hosting services out there, but I’ve chosen to outline how to set up a  private wiki in exactly the same way I did so that you have a specific reference point to work from. (Atabyte is great anyway, so I recommend if you’re starting out fresh you pick them when you’re buying your domain and hosting.)

To get started, you need to do two things:

1. First, set up a subdomain for your wiki

A subdomain is a division of your website. It appears as a word (or multiple words joined together, likethesewordsare) followed by a period, followed by your domain. For instance, if your website is, and you choose myworld for your wiki, then your subdomain would be

To set up a subdomain with Atabyte, you simply log into the control panel and, under the “domains” section, select “subdomains”. You’ll come to a form which lets you create your subdomain. It’s as easy as that.

2. Install MediaWiki on your host server

Once you have a subdomain, you can now install MediaWiki. In Atabyte’s control panel, scroll down to the “software” section and select “Softaculous app installer”. Softaculous is the name of the database that Atabyte uses to store the data for your wiki. Once you click on this, you’ll see several options in a left menu, one of which is “wikis”. Click that and you’ll see “MediaWiki” as one of the options. Select it. You’ll now see the “install now” option on the right. Select this and you can now create your wiki.

When you set it up, choose the subdomain you just created (from the “choose domain” option). You also create your admin username and password here. This is your master account from which you’ll have access your wiki once you set your world-building pages to private, so remember it.

Make sure you do backups!

You also want to make sure you set your wiki to backup regularly. This is all available when you install MediaWiki following the above instructions, but you can return to this anytime by coming back to the “MediaWiki” option in Softaculous app installer, then clicking on “edit” where you see your wiki listed (near the bottom).

When I am regularly world-building, I set mine to automatically backup, with a backup rotation of 4 times, and a backup frequency of daily. What this means is, at a given time every day, Softaculous will make a copy of all the data in my wiki. On day 5, it will go back to day 1’s data and overwite it. So I always have the 4 previous days of my wiki handy in case something goes wrong. When I am drafting and spending less time world-building, I set it to backup weekly. This way if I don’t get into my wiki for 8 days and someone hacked it / something corrupted, say, 6 days ago, I have the previous week to fall back on rather than possibly having nothing but hacked/corrupted backups.

I am still learning more about backing up, because there are other options, like an XML dump. The XML dump gives you an added impression of your wiki on a given date in case you ever needed something beyond what the regular backups will give you.

Unfortunately, there’s no way to compile your wiki into a big text document so that you could, for example, have a Word doc of everything saved somewhere. If there is, I don’t know about it yet, but when/if I do find out, I’ll make sure to put an addendum in this post.

But, I have been reassured by someone who really knows their tech: if you have set automatic backups and have enough copies, you are already quite safe! At least, as safe as we all are from the zombie apocalypse.

How to make your wiki private

If you want to keep your wiki public, then you can start creating right away. (If so, then scroll down to where I talk about first steps for creating your wiki.)

But maybe you want to keep your wiki private like me. You want this to be a private extension of your manuscript you can open in your internet browser as needed when you write, knowing you can dump in / change any information however you want without confusing anyone. You can reveal plot bunnies and nuances you’d never want readers to see, treat it like a sandbox where you can organize and explore ideas beyond what just the manuscript will give you.

If that’s the case, then here’s how you make your wiki private:

You need to set up a restricted access namespace. This doesn’t make your wiki private, but it makes all pages you publish inside that namespace private—and it’s these pages within that namespace that will function as your private wiki for your fantasy world.

By default, all pages published on your wiki are public. That’s the point of a wiki, after all. But MediaWiki designed namespaces to allow wikis to be better divided up. A namespace (read more on it here) is a specific collection of pages within your wiki that all can be assigned special privileges for certain users, such as the ability to modify and access.

I’ll use my own hosting setup with Atabyte again for reference to walk you through this step. We’ll continue to use our example of the subdomain “”.

In the main control panel, under the “files” section, click on “file manager”. This will open up the file directory of every page on your website. On the left, in the tree display, click on “public_html”. This will cause the menu to open up and reveal a folder that’s got the title of the subdomain you created. So in our example case, we see a folder called “myworld”. Click on that.

On the right, you’ll see a display of all the files within your subdomain. Scroll down until you come to “LocalSettings.php”. Select it and click “edit”. Once the file editor opens, you’ll see a long list of code. (And please, if any of this is unfamiliar to you, get help from a tech friend—if you don’t know one, email me at and I’ll try to help.)

Scroll right down to the bottom. You’ll see that the script terminates on the last line with the “}” character. Click to the left of it and hit enter a few times so that you create some free lines above it. In those free lines, you need to enter the following:

  • (note #1: every line ends in the “;” character, i.e. hit the enter key after you type every “;”)
  • (note #2: upper/lowercase matters, i.e. SECRET is not the same as Secret)
define("NS_SECRET", 100);
define("NS_SECRET_TALK", 101);
$wgExtraNamespaces[NS_SECRET] = "Secret";
$wgExtraNamespaces[NS_SECRET_TALK] = "Secret_talk";
$wgNamespacesWithSubpages[NS_SECRET] = true;
require_once "$IP/extensions/Lockdown/Lockdown.php";
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createaccount'] = false;
$wgRestrictDisplayTitle = false;

Replace “SECRET” / “Secret” with the name you want to give you world wiki’s private pages. For example, if you decide to call your namespace “Notes” then where you see SECRET you would write NOTES, and where you see Secret, you’d write Notes.

Click on “save changes” and you will now have your private namespace, and be ready to start creating wiki pages for your fantasy world-building.

A bit of explanation, for the curious:

The first five lines:

define(“NS_SECRET”, 100);
define(“NS_SECRET_TALK”, 101);
$wgExtraNamespaces[NS_SECRET] = “Secret”;
$wgExtraNamespaces[NS_SECRET_TALK] = “Secret_talk”;
$wgNamespacesWithSubpages[NS_SECRET] = true;

are all to create the namespace. Unless you want to dig into how PHP programming works, best not to worry much beyond that.

The next line:

require_once “$IP/extensions/Lockdown/Lockdown.php”;

is what locks the namespace down to keep it private.

The next two lines:

$wgGroupPermissions[‘*’][‘edit’] = false;
$wgGroupPermissions[‘*’][‘createaccount’] = false;

prevent anyone from creating their own user accounts, and from being able to edit the wiki. This is important because, although your private namespace will be locked from the public, your public wiki is still open. Someone can enter and they will land on your wiki (the public pages, not your private ones). Without these two lines of code, they can, if they want, create a username and start creating/saving/modifying pages in the public part of your wiki. If this doesn’t bother you, then you can exclude these two lines. I chose to add them because I’ve envisioned at some future date “publishing” some of my more finalized / supplementary wiki pages, and doing so would be just a matter of moving these pages from the namespace I created to the general wiki. Anyone online could then read them, but not change them, so these would function a bit like appendices to my books. And, in the meantime, I can be assured my public wiki will remain empty until then.

What if you want to have special user accounts who can access your private wiki in read only?

This is just a matter of adding two more lines of code to the list above (just add them directly below the last line):

$wgGroupPermissions[‘SpecialUser’] = $GroupPermissions[‘user’];
$wgNamespacePermissionLockdown[NS_SECRET][‘*’] = array(‘SpecialUser’);

Here, replace “SpecialUser” with whatever you want to call this special account. Replace “SECRET” with the name you gave your namespace. For instance, if you want to call these users CoolPeopleClub, and your namespace is called Notes, then you would have:

$wgGroupPermissions[‘CoolPeopleClub’] = $GroupPermissions[‘user’];
$wgNamespacePermissionLockdown[NS_NOTES][‘*’] = array(‘CoolPeopleClub’);

Now, when you are logged into your wiki and creating accounts for people, you will see “SpecialUser” (or whatever you choose to call it) listed and you can select that privilege for the users you want to have view-only access to your private wiki. They won’t be able to edit it because of the editing restriction—the only people who have that privilege are administrators like you, or other admin accounts you choose to create. This is why I highly recommend you implement the no edit / no account creation restriction on your wiki as a whole.

How to make wiki pages in your private wiki and FINALLY bring your fantasy world to life!

Now, finally, we have our fantasy world ready to be created! All that remains is learning a bit about how MediaWiki actually works.

The first and most important thing is how to get onto your private wiki.

This is a simple matter of opening your browser (Chrome, for example) then typing in the following (replace “secret” with whatever you chose to call your namespace):

The first thing that’s going to happen is you’ll come to a login screen. Use the admin username you created when you set the wiki up and login.

Now you’ll see a page that looks a bit like Wikipedia, but you’ll see a sentence on it telling you the page doesn’t exist yet. On the top right menu, there is a “create” option. Click that and it will make a text window load. You can type in anything you want then save it to create the page.

If you’re new to this and just want to create your first page so you have a “home base” for your wiki, then simply type “Hello world” then hit save. Now you’ll see, whenever you visit “” and login, the two words “hello world” in the main screen on the right.

You’ll also see secret “Secret:Index” displayed above that in larger font. This is called the display title and it’s on every page.

This is what the final line in the script above is for:

$wgRestrictDisplayTitle = false;

It allows you to customize the display title on each wiki page you make. If you don’t add this, all your pages in your private wiki are going to have the display title: Secret:Page_name, where “Secret” is the name of the namespace you create, and Page_name is the specific name of the page you create (more on how to do that below).

To change the display title on each page, type:

{{DISPLAYTITLE:Desired Name}}

where “Desired Name” is whatever you want to appear at the top.

In our example of our first index page with “Hello world” on it, if you want to call it “Index”, you’d type in the text box:


on the first line (above “Hello world”).

From here, the world is your oyster. You can create new pages anytime you want to branch out. You just need to make sure they always take on the form:

where Secret is the namespace you chose for your private wiki, and Page_name is whatever you want to call the page. For instance, if you have lots of character notes and want those all in one page, and you want to call that page “Characters”, you just type in:

This page doesn’t exist yet, so all you need to do is is click create on the top right menu and enter in whatever text you need. You can change the display title at the top with the same syntax as above, i.e. if you want its heading to read Major Characters, the very first line should read {{DISPLAYTITLE:Major Characters}} and whenever you view this page you will see Major Characters as the main header. Enter in then whatever text you need for your notes and save it to create the page.

I like to create the Index page as the central page for the wiki. This means every time I create a new page for branching information, I put the links to those pages in an organized table.

To create a link to another page, this is just a matter of typing [[Secret:Page name|Link text]]. Change “Secret” with the name of your namespace, and “Page name” with the exact name you chose for the page. For example, with our Characters page, if I wanted to put a link to it on the Index page, I would type [[Secret:Characters|Characters]]. On the index page, all that will show up is the word “Characters” as a link. Just remember that the text to the right of the “|” character is whatever will display on the page, and the text to the left is the actual link.

There is a bit of a learning curve with using MediaWiki. If you’ve ever programmed in HTML or have worked a bit with web language, this is easy to pick up. I find whenever I need to brush up on syntax or am not familiar with how to do something, everything I need to know is in the help section ( This is available as a link on the left of every page of your wiki, so you can click on it whenever you need help.

Especially consult the formatting section for information on rules for typing the text. For example, if you don’t hit enter twice between lines, those lines will join together. If your text looks like this:

Galen works in the city of Alendryll,

He is a cooper

When you save you will get:

Galen works in the city of Alendryll, He is a cooper

because MediaWiki saves one paragraph space as a regular space.

A few quick pointers before I close:

If you want to type something in italic, then surround the words(s) in ”two single quotes”. If you want to type something in bold, then surround the word(s) in ”’three single quotes”’. If you want it bold and italic, then surround the word(s) in ””four single quotes””.

When dividing up your topics, you can use nested headers to define major sections of your article.

To give you an example, I have a page on fauna in my world. On that page, I have sections for the main countries. To create these, I have the following format in my text:

== Main country 1 ==

== Main country 2 ==

These show up as large bold headers. Within the countries, I mention specific wildlife. For example, I have a deal of notes about horses in the Pikelands, in Mithlim, and in the Mountainlands. The horses subsection in the Pikelands section takes on this format:

== Pikelands ==

=== Horses ===

Where the === indicates a division within the main division by country. On the actual page, this shows up with the largest bold font for Pikelands, and a smaller bold sub-header font for Horses.

If there is a division within a division within a division, then you can add an =. So:

==== sub-subdivision ====

This shows up as a regular size bold font, but it will act as a header on its own line. Beyond this, ask yourself if you should be dividing the page up into separate pages, because though you can keep going, i.e. =====, ======, the font is the same regular bold font after ====.

You can also make a list by starting a line with *, i.e.




will make a bullet-point list. If you want a numbered list, use # instead. If you want to nest your list items, then use ** or ***, i.e.


**Famous poetry on chivalry

**Codes within chivalry

***Valen’s Code of Knighthood

I also find tables helpful to organize information. These are bit more complicated and something you’ll only need once you find your notes really coming together and you want a directory. Here is where you can read about making tables if you need that information.

Over to you, time to get busy building!

I wrote this post with the intention of giving you a complete guide to how to get going and feel that I’ve done that. But I realize as I arrive at the end that there is so much more I could talk about. Please tell me in the comments what you’d like to know more about and I’ll factor it into a possible future post.


About John Robin

John Robin is an epic fantasy writer, professional editor, and lover of imaginary worlds. He write stories about magic and myth, human suffering and the power to rise above it. He loves world building, coffee shops, mathematics, chess, and is an avid author community builder.
This entry was posted in John's blog, World Builders, Writing Tips and tagged , , , , , , , . Bookmark the permalink.

4 Responses to How I created a private wiki for my fantasy world-building

  1. landofoyr says:

    you really did make it difficult!
    last month when I finished amazon’s xray for my first ebook I decided to make a wiki as well
    but I used for a free and easy solution
    not that what you did was not good but sure seems it needs a lot of time!

    • John Robin says:

      I wasn’t aware that Amazon had this option. Is the wiki private? I may check it out. That said, this is quite easy to do once you learn how to use it so I would have no reason to switch now. But for writers who don’t want to have to set this all up, if allows you to make a private wiki for your notes, then please let me know so people in the comments here are aware of the other options.

  2. Thank you for this. It’s a thorough, step by step guide on how to set up and use wiki. This is a great tool for world building and certainly beats my scruffy notebook system. 😊

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s