---
title: "Changing your URL in MediaWiki"
description: "In this tutorial we will show you how to change your URL in Mediawiki. This is useful when testing your site on a Shared SSL, or when you want to modify your domain name. It will be accomplished by..."
url: https://www.inmotionhosting.com/support/edu/mediawiki/change-url/
date: 2014-01-21
modified: 2021-08-16
author: "InMotion Hosting Contributor"
categories: ["MediaWiki"]
type: post
lang: en
---

# Changing your URL in MediaWiki

[![Image of MediaWiki before changing URL](https://www.inmotionhosting.com/support/wp-content/uploads/2014/01/mediawiki_before-changing-url.png)](/support/wp-content/uploads/2014/01/mediawiki_before-changing-url.png)

In this tutorial we will show you how to **change your URL in Mediawiki**. This is useful when testing your site on a **Shared SSL**, or when you want to modify your *domain name*. It will be accomplished by editing the **LocalSettings.php** file. For this article I am changing the URL from: *https://example.com/mediawiki* to: *https://secure49.inmotionhosting.com/~userna99/mediawiki*

You must already have [MediaWiki installed](https://www.inmotionhosting.com/support/edu/mediawiki/how-to-install-mediawiki-on-your-domain/) before attempting this guide.

## How to Change your URL:

1. Using the [editor](https://www.inmotionhosting.com/support/edu/mediawiki/edit-format-mediawiki-content/) of your choice, navigate to the **LocalSettings.php** file in the folder you installed MediaWiki.
2. Locate the line of code that begins with **$wgServer**. By default, it will look similar to this: $wgServer = "https://example.com";
3. Change the domain to your new URL, and save your settings. In my test I am using a [shared SSL](https://www.inmotionhosting.com/support/website/ssl/how-does-the-shared-ssl-work/), it will look similar to this after: $wgServer = "https://secure49.inmotionhosting.com";
4. Next, in your **LocalSettings.php** locate the line beginning with **$wgScriptPath**, it may look similar to this by default: $wgScriptPath = "/mediawiki";
5. Enter the new folder location if it is changing. For example: $wgScriptPath = "/~userna99/mediawiki";
6. Save your changes, and test the website. You may have to [clear your browser cache](https://www.inmotionhosting.com/support/website/how-to-clear-browser-cache-for-major-browsers/) before seeing the changes. [![MediaWiki after changing URL](https://www.inmotionhosting.com/support/wp-content/uploads/2014/01/mediawiki_after-changing-url.png)](/support/wp-content/uploads/2014/01/mediawiki_after-changing-url.png)

Congratulations, now you know how to *change* your **Mediawiki URL**!
