March 17, 2018, 08:11:44 PM

* Site Menu

Moving A Forum To A Different Subdirectory

This document can be used whether you have SMF 1.x or SMF 2.x.

First things first! Many new users will put everything into their /public_html or /htdocs directory. Which one you have depends on whether you are using a linux or Windows server, respectively. Both are basically the same thing.

Many types of different software, especially those written in PHP, will often contain files and directories with the same names. So, if you put two files with the same name such as index.php you will overwrite the the one that was there first with the one you put there last. This is OK if you are specifically updating a file and intend to do this. But if you are using two different types of software with the same filenames you will wreak havoc on your sites and will have to jump through rings of fire trying to figure out how to separate them and get each one working again.

Lets say that you have 2 different forums such as SMF and phpBB, for example. Both may have similarly named files as well as similarly named directories. If you install or upload one to the exact same root directory as the other, you will overwrite some forum files and directories with the other...not a good thing. Needless to say, your users on 2 different forums will NOT be happy about this.

So, lets get on with it....

1.  Switch to everyone and the entire forum to the default SMF theme...especially for SMF 1.x forums!

2.  Put your forum in Maintenance Mode. Why? If someone does something before you are finished it will not be saved after the move.

3.  Backup everything! Your files and the database separately!!!

4.  Backup everything! Just checking to make sure you did it the first time.  :hah:

5.  Create a new directory on your server for where you wish to move your forum to UNDER /public_html or /htdocs. I.E., /public_html/smf or whatever you wish.

6.  If you have cPanel (the easiest and fastest way), use this: copy all of the files from your forum and copy them to the new directory. DO NOT copy the directory itself! Only the files!!! Otherwise, use the following:
  • If you do not have cPanel and have something similar that can easily copy and move directories in an instant then use that.
  • If you do not have a server control panel then you will have to copy all of the files via FTP to the new directory.
7.  Upload repair_settings.php from to the new root forum directory and run This will reset your forum paths and URLs to point to the new directory.

"" = your forum's URL + the new directory.

8.  Follow the prompts and make the necessary changes.

9.  Delete repair_settings.php are you are finished.

10.  Play with your forum to make sure everything is working as before. Some mods may require you to go into their settings and manually change any paths or URLs to point to the new directory.

11.  You may want to use a cPanel redirect to make your domain name point to the new directory. You can also do this in a number of other ways such as using PHP commands in a index.php placed in /public_html or /htdocs.