... Elxis version 2009.3 codename Aphrodite is out, download it from Elxis Download Center (EDC) ...
Move Elxis from a sub-dir to the root dir
From Elxis Official Documentation
Sometimes, especially when we want to test Elxis or to create our site in private while an old site is running we install Elxis in a sub-directory. In this guide we will show you how you can move your Elxis site to an other folder (to the www root folder in this example) fast and easy. I will use SSH access to make this process fast as light. You can do the same using FTP if you don't have SSH access but will take you longer. If you wish to be sure that everything will go fine take a full site backup (both files and database) before you proceed further.
Move Elxis files
For this example sake we consider our enviroment as follows. I write example paths for CPanel (running on Red Hat). Change the paths if needed to suit your server enviroment.
WWW root folder: /home/user/public_html
Elxis installation folder: /home/user/public_html/elxis
With the current set up Elxis is accessed from a browser like this:
We want to move Elxis to the WWW root folder in order to be accessible like this:
Login to your server using SSH and go to the WWW root folder.
Make sure there are no folders or files there that have the same names as Elxis! cd to the Elxis installation folder:
Move everything a folder up:
mv * ../
Sometimes a file (i.e. an .htaccess file) stays in the old directory. Make sure everything was moved a folder up and the elxis/ directory is empty. If not, move the remaining files manually.
mv \.htaccess ../.htaccess
Go to the WWW root folder and remove the empty elxis/ folder:
Update configuration.php file
Download configuration.php and edit it with PsPad or another UTF-8 enabled text editor. Remove the old sub-directory (elxis) from the paths and the URLs .
<?php //From this: $mosConfig_absolute_path = '/home/user/public_html/elxis'; $mosConfig_live_site = 'http://www.mydomain.com/elxis'; $mosConfig_cachepath = '/home/user/public_html/elxis/cache'; //Change to this: $mosConfig_absolute_path = '/home/user/public_html'; $mosConfig_live_site = 'http://www.mydomain.com'; $mosConfig_cachepath = '/home/user/public_html/cache'; ?>
Save and upload back to your server the configuration.php overwritting the old one.
There will be surely images and links in your database written based on the old URL (the one with the "elxis" sub-directory). We need to update them otherwise you will have 404 errors (page not found). Login to your database manager (i.e. phpMyAdmin) and take a full database backup. Open the SQL backup file with PsPad. Select from the menu Search -> Search and replace.
Replace all URLs from this:
Save the SQL file and import it in your online database (you will have to drop all existing db tables before).
Update .htaccess file
If you had SEO PRO enabled in the old Elxis site (the one in the sub-directory) you have to update the .htaccess file. In this case edit .htaccess file and change:
That's it! Everything should work fine now and your Elxis site will be accessible from the WWW root directory!
Login to Elxis administration and go to administrator>tools>Fix Language.
This tool Performs a check in multilingual database tables and applies fixes where needed.
Login to Elxis administration and go to component SoftDisk. Click once on the Update System icon to update SoftDisk (system paths and URLs). Go to Elxis tools and run the Clean Cache tool to make sure there are no old cached files. Job done, congratulations!