I can think of 3 cases:
- Change the domain only.
- Transfer the site to a new server.
- Transfer data created by Element Flow only.
Note for internal links, don't copy the URL of an internal page from the address bar to fill in a link field, which is okay, but not recommended, the URL you filled won't change automatically when the domain is changed or the Friendly URL is changed, you need to do an extra amount of work to take care of it.
The recommended way is to select the internal page from a, the won't reflect. or fill in the link field by using the dynamic tag feature, by doing that, the URL of an internal page will be always correct.Â
#1 - Change the domain only
When you take your site live, you may need to change the domain, for example, from staging.elementflow.com to elementflow.com, then go to BO > Configure > Traffic & SEO SEO & URLs to change the domain, that's it.
#2 - Transfer the site to a new server
Transfer all files and the database to a new server.
- (On the old server) Change these settings database_name, database_user, and database_password in the /app/config/parameters.php, Generally, no need to change the database_host, keep it as localhost or 127.0.0.1.
- (On the old server) Zip all files of the stagin site, it's recommended to don't zip the /var/ folder to make the zip file be smaller.
- Upload the .zip file to your sever via a FTP client, and then unzip via cPanel.
- (On the old server) Export the database out to a .sql file, generally via phpmyadmin.
- Open the .sql file with a text edit(Like Editplus, Sublime), replace all old urls with the new ones. For example, the old url is staging.elelement.com, then you just need to replace all of them in the .sql file with elelement.com
- (On the new server) Import the modified .sql file on your live site by using the tool provided by your hosting provider, generally it's phpmyadmin.
- (On the new server) Login to your site back office to clear the Smarty cache.
#3 - Transfer data created by Element Flow only
- (On the old server) Go to BO > Improve > Element Flow > Settings > Import & export > Export API, to find API URL and Token.
- (On the old server) And then click on the Export button to select data you would like to export.
- (On the new server) Go to BO > Improve > Element Flow > Settings > Import & export > Import from other sites, copy API URL and Token from the old server to paste them here, and save.
- Click on the Import button in the top right corner.
- Select the old server to import its data.
- For more info about the import & export feature, check the Install > Import demo data on the left navigation menu.
Move a site from a subfolder up to the root folder.
It's common to put the staging side in a subfolder and move it up to the root folder when it's ready to go live. In this case, images you uploaded via the image uploader may stop showing, one more step needs to be done to fix it.
When it's in a subfolder, image paths saved in the database base look like this /a-subfolder/img/cms/an-image.jpg. When the site gets moved to the root folder, the paths need to be changed to /img/cms/an-image.jpg, which can be done by using the Path replacement tool on the BO > Improve > ElementFlow > Settings page.
Fill /a-subfolder/img/cms/ to the Old path field, and fill /img/cms/ to the New path field. Note paths must contain /img/cms/ and must start and end with a /
If you make a copy of a live to a subfolder, then do the reverse. Fill /img/cms/ to the Old path field, and fill /a-subfolder/img/cms/ to the New path field.