If you find that you need to change your domain for your license, please follow these steps. Please ensure you are only having one website per license, as the license terms state though, as changing the domain will disable authorization for the original domain and can cause your host to delete your site as it will show unlicensed.
To Change Your License in Your Account
- Log into your account
- Once you are in your account, you will see the "Your Active Services/Products" block:
- Click your license you see in the list and you will be brought to the page that shows your license ID, Key, domain name and download link:
- Click Change to change the domain name.
To Change Your Website Files to Use the New Domain
Once you've changed your licensed domain in your account, if your website was already installed before, you need to change some files on the server in order for your website to use the new domain name.
- Either log into Cpanel or use an FTP program to connect to the server.
- Find the PF.Base/file/settings/server.sett.php file and download a copy to keep as a backup. Then, on the original file, open it in a text editor.
- From lines 33 - 35, you will see the following codes:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$_CONF['core.host'] = 'oldsite.com';
-
$_CONF['core.folder'] = '/oldsubfolder/'; |
Line 33 above is for the site domain. Change that to the new one.
Line 35 above is for the subfolder if you had or have the website installed in a subfolder. If you did have it in one and don't have it in one now, simply change line 35 to show as follows:
Code Block | ||
---|---|---|
| ||
$_CONF['core.folder'] = '/'; |
- If you also have a different database you need to change those settings in the same file. (This is usually only necessary if moving hosts) You'll find the database settings near the top of the file as seen here. Your host can help you with some of these settings if necessary to change.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
$_CONF['db']['driver'] = 'mysqli';
$_CONF['db']['host'] = 'localhost';
$_CONF['db']['user'] = 'olddbuser';
$_CONF['db']['pass'] = 'olddbpassword';
$_CONF['db']['name'] = 'olddbname';
$_CONF['db']['prefix'] = 'phpfox_';
$_CONF['db']['port'] = ''; |
- Once you've changed those, you need to save the file and then fully clear your site's cache.
Changing the .htaccess if Using Short Urls
If you had short urls enabled, or if you had the .htaccess for some other reason, you'll need to change it in order to point to your new domain.
- Using Cpanel or FTP find the .htaccess file in your root folder where the phpFox files are installed. You will need to select to See Hidden Files or View Hidden Files as this file is a hidden file on the server. Make a copy of this file in case you need it.
- Open the original file in a text editor and find the following line around line 4
Code Block |
---|
RewriteBase /yoursubfoldername/ |
- Change that line so it points to your new subfolder or if not using one, just remove the subfoldername/ so it would then look like this:
Code Block |
---|
RewriteBase / |
- Double check the file for any other site urls you might have placed in it if you added anything to it and then save the file to your server and clear cache.
Tip | ||
---|---|---|
| ||
|