Home
/
Other Applications
/
How to move my SMF site from a subfolder to my main/public_html directory?

How to move my SMF site from a subfolder to my main/public_html directory?

If you want to move your SMF site from a subfolder to your public_html directory, follow these steps:

1. Move all the files from your current SMF installation folder to your public_html folder.

2. Edit the following lines in your Settings.php file, to suit your modifications:

$boardurl = ‘http://YOURSITE.com/SMF_FOLDER’;  # URL to your forum’s folder. (without the trailing /!)
$boarddir = ‘/home/USER/public_html/SMF_FOLDER’; # The absolute path to the forum’s folder. (not just ‘.’!)
$sourcedir = ‘/home/USER/public_html/SMF_FOLDER/Sources’; # Path to the Sources directory.

You can edit it through Site Tools > Site > File Manager > Find the file > click on it’s name > click ‘Edit‘.

You can also download it to your computer and edit it locally, then upload and replace the original with the one you’ve edited.

3. You should make the following changes in your MySQL database. Here is the path to do the changes:

Go to Site Tools > Site >MySQL > and click on phpMyAdmin > Access phpMyAdmin. On the left bar select the database of your SMF installation > Do the following changes:

In the table ‘smf_settings’ change to suit the following:

attachmentUploadDir : /home/USER/public_html/SMF_FOLDER/attachments

—————————————————————————
For example:

attachmentUploadDir : /home/USER/public_html/SMF_FOLDER/attachments

should become

attachmentUploadDir : /home/USER/public_html/attachments
—————————————————————————

smileys_dir : /home/USER/public_html/SMF_FOLDER/Smileys

smileys_url : http://YOURSITE.com/SMF_FOLDER/Smileys

avatar_directory : /home/USER/public_html/SMF_FOLDER/avatars

avatar_url : http://YOURSITE.com/SMF_FOLDER/avatars

In the table ‘smf_themes’ change to suit the following:

theme_url : http://YOURSITE.com/SMF_FOLDER/Themes/default

images_url : http://YOURSITE.com/SMF_FOLDER/Themes/default/images

theme_dir : /home/USER/public_html/SMF_FOLDER/Themes/default

theme_url : http://YOURSITE.com/SMF_FOLDER/Themes/classic

images_url : http://YOURSITE.com/SMF_FOLDER/Themes/classic/images

theme_dir : /home/USER/public_html/SMF_FOLDER/Themes/classic

theme_url : http://YOURSITE.com/SMF_FOLDER/Themes/YOURTHEME

images_url : http://YOURSITE.com/SMF_FOLDER/Themes/YOURTHEME/images

theme_dir : /home/USER/public_html/SMF_FOLDER/Themes/YOURTHEME

After that, your SMF site should work like before.

* Bear in mind that in order to successfully perform such migration, there shouldn’t be any scripts installed in your root folder at the time of the migration, since this may corrupt both applications.

Share This Article