Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

This article will guide you to change the domain of MetaFox site. Assume that your MetaFox site has been installed successfully at the URL: https://olddomain.com . Now, you would like to change the domain to https://newdomain.com 

Configure new domain with the server

Assume that you have purchased the new domain from the domain issuer. You will need to make sure that the new domain (newdomain.com) has been set up properly as below

  • DNS of new domain is pointed to your current server
  • New domain has been set up with the webserver (Apache or NginX).
  • Set up SSL for the new domain on server (optional)

You can contact your hosting provider for support to set up new domain on your server if you don't know how to do it.

Update the .env file

The .env file will be generated automatically under the webroot folder when installing MetaFox site. This file contains many critical configuration for database and site URL.

To access and update this with your new domain, you'll need to find your FTP credentials from your hosting provider, or use File Manager of Server Management Tool (such as cPanel, Plesk).

Once you have access to the server, browse to the webroot folder (such as public_html), edit the .env file. What you will see is similar below:

APP_ENV="production"
APP_DEBUG=false
APP_URL="https://olddomain.com"
MFOX_LICENSE_ID="7dc6f977bf1836xxxxxxxxx"
MFOX_LICENSE_KEY="9a0506e57c0335xxxxxxxxx"
MFOX_DAT_DRIVER="pgsql"
MFOX_DAT_HOST="localhost"
MFOX_DAT_PORT=5432
MFOX_DAT_DBNAME="metafoxdb"
MFOX_DAT_USR="metafox"
MFOX_DAT_PW="wLcktnCxxxxxxxxxx"
# Other configurations
.....

You can look for the config APP_URL and update it with the new domain as below. 


APP_URL="https://newdomain.com"

Then, Save the .env file.

Congratulation. The procedure to change domain is done. You can check your site with the new domain now.

  • No labels