After testing XCL for a while, I decided to migrate one of my sites from ImpressCMS 1.0 to XCL. Don't ask me for reasons please. Going XCL does not mean I will stay away from xoops.org or impresscms.org. I love going to knock around to help/comment about xoops things.
There is no direct way to migrate to XCL from xoops with version 2.0.14 or above. That why I wrote this after I did a test of migration from ImpressCMS (based on xoops 2.0.17). Hope this will be useful for some of you.
This howto is not for a novice but for some xoops experts. Sorry.
Environments
I am running impresscms 1.0 on my own Linux server which I have full control over it. I did almost of things via command lines. Please see the commands and translate them to English to achieve the same results if you use GUI and/or Microsoft Windows.
- Linux x64
- Apache 2.2.x
- MySQL 5.0.x
- PHP 5.2.x
- ImpressCMS 1.0
- XCL 2.1.4
Scope
This article is worth reading if you are trying to migrate to XCL 2.1.x from one of the following cores:
- ImpressCMS 1.0 Final (Janus) (from impresscms.org)
- Xoops 2.0.14.x, 2.0.16, 2.0.17.x, 2.0.18.x (from xoops.org)
- In this article I use some 'constants' as following:
a) old XOOPS_ROOT_PATH = /home/avtx30/html
b) old XOOP_URL = http://www.mydomain.com
c) new XOOPS_ROOT_PATH = /home/avtx30/newsite
d) new XOOPS_URL = http://newsite.mydomain.com
e) common prefix_TRUST_PATH = /home/avtx30/prefix_trust_path
f) MYUSERNAME is MySQL database username
g) MYPASS is MySQL database password
h) CURRENTDB is MySQL current database name (for ImpressCMS)
i) NEWDB is MySQL new database name (for Xoops Cube Legacy)
j) MYTHEME is my current theme which will be used on the new site
k) MYSQLROOTPASS is MySQL root (admin) password
You have to do the migration manually.
You have skills to deal with MySQL from command lines. Phpmyadmin may work too but I did not test. I don't like GUI
You have skills working with Linux/Unix shell command such as cp, mv, rsync etc.
Things automatically migrated
What I actually migrated are as following:
- Altsys 0.58 (block/permission/template/language constants utility)
- Protector 3.17 (security module)
- multiMenu 1.15 (malaika-system multimenu module)
- sitemap 1.03 (GIJOE's sitemap)
- tellafriend (GIJOE's tell-a-friend module)
- waiting 0.95 (waiting content manager)
- istats 2.1 (Site access stats module)
- mylists (custom module)
- marquee 2.41 (instant-zero marquee module)
- rw_banner 1.5 (banner module)
- chcal (custom module)
- attach (files attacher)
- happy_linux 1.40 (ohwada's framework)
- happy_search 0.53 (search module with google search)
- d3pipes 0.60 (RSS feed module)
- logcounterx 2.71 (Site access stats module)
- Uploads data, avatar, smileys, private messages, users, groups
- news 1.54 (instant-zero news module)
- smartfaq 1.08 (FAQ)
- pico 1.6 (5 instances)
- d3forum 0.82 (forums)
- xoopstube 1.03 (video module)
- xpress 2.05 (wordpress for xoops. Later I replace it with wordpress by Mikhail)
- d3downloads 0.82c (download module)
- d3xcgal 0.23 (D3 version of xcGal module)
- xwords 0.46 (based on wordbook module)
- mylinks 1.10
- Above modules data
Things mannually migrated
What I had to re-config on the new site are as following:
- Xoops configuration
- Module preferences
- Block configurations
- Module/Block access permissions
Things left
What I have to or intentionally drop-out are as following:
- article 1.0 (I will replace it with onokazu's Xigg)
- liaise 1.26 (I will replace it with Marijuana's inquiry)
- notifications (I don't use notifications on my site)
What I had done to migrate
1. Backup
I backup my current database. This is not critical in this migration work but you should do it as a good habit when changing things.
2. Prepare for a new xoops site
I want my current site at http://www.mydomain.com work properly as if nothing happened during the migration. To achiveve this I set-up a new xoops site with the new XOOPS_URL will be http://newsite.mydomain.com and the new XOOPS_ROOT_PATH will be /home/avtx30/newsite
I copy the following files/directories under old XOOPS_ROOT_PATH to new XOOPS_ROOT_PATH: modules, uploads, themes/, and favicon.ico. I like rsync when doing this kind of task.
3. Download and unzip Xoops Cube Legacy
I download XCL version 2.1.4 from xoopscube.org, unzip it then copy the content under its 'html' directory to my new XOOPS_ROOT_PATH except for the fowllowing:
- uploads/
- favicon.ico
Here are the commands:
Also chmod directories for later installation
4. Create a new database for XCL
I created a new database for XCL and I left the current database as it is. It's safe!
5. Install the XCL
I open http://newsite.mydomain.com via a web browser and following the instructions to install the XCL with:
- common prefix_TRUST_PATH
- new XOOPS_ROOT_PATH
- new XOOPS_URL
- NEWDB
- MYPASS
- the same tables prefix to the current site
6. Check if the installation OK
During the installation of XCL I was asked for creating an admin account. I create one then login into the newly installed site. I was recommended to chmod the mainfile.php and delete the 'install' folder under new XOOPS_ROOT_PATH. I just did it as recommended.
After that I take time to play with XCL. What I did are:
- Change the site preferences
- Change meta tags, keywords
- Change the default theme to MYTHEME
7. Backup the new site before copying/importing things
I am going to install modules to the new site and import data from the current site. This is a big challenge that I have to backup my newly install site so that I won't have to install it again.
8. Install modules
From the control panel of XCL (the new site) I install all of the modules listed above (Things automatically migrated).
9. Import data
This is the most important step to have my valued data (posts, comments, pm, articles, votes, etc.) with XCL.
I use MySQL command 'show tables' to list current tables in the CURRENTDB.
I selected tables store users, groups, avatar, smileys, private messages, comments
Trích dẫn:
and tables that associated with my installed modules. The following list is for news, smartfaq, d3forum, pico, and xoopstube (xoops is my tables prefix). The list is actually much longer.
Trích dẫn:
It's critical to EXCLUDE these following tables otherwise your new site will be a mess!!!
nbn_banner
nbn_bannerclient
nbn_bannerfinish
nbn_block_module_link
nbn_xoopsnotifications
nbn_config
nbn_configcategory
nbn_configoption
nbn_group_permission
nbn_image
nbn_imagebody
nbn_imagecategory
nbn_imgset
nbn_imgset_tplset_link
nbn_imgsetimg
nbn_modules
nbn_newblocks
nbn_online
nbn_ranks
nbn_session
nbn_tplset
nbn_tplfile
nbn_tplsource
Firstly I imported users, groups, avatar, smileys, private messages, and comments.
Trích dẫn:
After that I check if the data successfully imported.
Check if users are imported properly by logging-out then logging-in with my accounts at current site (not the one create in step 6 at the new site)
Check Avatar at: new XOOPS_URL/modules/user/admin/index.php?action=AvatarList
Check Smileys at : new XOOPS_URL/modules/legacy/admin/index.php?action=SmilesList
Check private messages at new XOOPS_URL/viewpmsg.php
Check comments at new XOOPS_URL/modules/legacy/admin/index.php?action=CommentList
Secondly I import modules data:
Trích dẫn:
10. Config the new site
After step 9 I started to config my new site so that it looks exactly the current site. When done, I swap the paths and change the mainfile.php so that my new site will be accesss from http://www.mydomain.com.
Swap the paths:
Change the mainfile.php under html directory:
Before
Trích dẫn:
After
Trích dẫn:
With this structure I can easily swap the sites: the old (ImpressCMS) and the new (Xoops Cube Legacy). I found that it's the safest way for me.
English is not my first language. I tried to write but I don't know if you can understand. Questions, comments are welcomed. I am happy if this could help some of you who are trying to reach XCL.
There is no direct way to migrate to XCL from xoops with version 2.0.14 or above. That why I wrote this after I did a test of migration from ImpressCMS (based on xoops 2.0.17). Hope this will be useful for some of you.
This howto is not for a novice but for some xoops experts. Sorry.
Environments
I am running impresscms 1.0 on my own Linux server which I have full control over it. I did almost of things via command lines. Please see the commands and translate them to English to achieve the same results if you use GUI and/or Microsoft Windows.
- Linux x64
- Apache 2.2.x
- MySQL 5.0.x
- PHP 5.2.x
- ImpressCMS 1.0
- XCL 2.1.4
Scope
This article is worth reading if you are trying to migrate to XCL 2.1.x from one of the following cores:
- ImpressCMS 1.0 Final (Janus) (from impresscms.org)
- Xoops 2.0.14.x, 2.0.16, 2.0.17.x, 2.0.18.x (from xoops.org)
- In this article I use some 'constants' as following:
a) old XOOPS_ROOT_PATH = /home/avtx30/html
b) old XOOP_URL = http://www.mydomain.com
c) new XOOPS_ROOT_PATH = /home/avtx30/newsite
d) new XOOPS_URL = http://newsite.mydomain.com
e) common prefix_TRUST_PATH = /home/avtx30/prefix_trust_path
f) MYUSERNAME is MySQL database username
g) MYPASS is MySQL database password
h) CURRENTDB is MySQL current database name (for ImpressCMS)
i) NEWDB is MySQL new database name (for Xoops Cube Legacy)
j) MYTHEME is my current theme which will be used on the new site
k) MYSQLROOTPASS is MySQL root (admin) password
You have to do the migration manually.
You have skills to deal with MySQL from command lines. Phpmyadmin may work too but I did not test. I don't like GUI

You have skills working with Linux/Unix shell command such as cp, mv, rsync etc.
Things automatically migrated
What I actually migrated are as following:
- Altsys 0.58 (block/permission/template/language constants utility)
- Protector 3.17 (security module)
- multiMenu 1.15 (malaika-system multimenu module)
- sitemap 1.03 (GIJOE's sitemap)
- tellafriend (GIJOE's tell-a-friend module)
- waiting 0.95 (waiting content manager)
- istats 2.1 (Site access stats module)
- mylists (custom module)
- marquee 2.41 (instant-zero marquee module)
- rw_banner 1.5 (banner module)
- chcal (custom module)
- attach (files attacher)
- happy_linux 1.40 (ohwada's framework)
- happy_search 0.53 (search module with google search)
- d3pipes 0.60 (RSS feed module)
- logcounterx 2.71 (Site access stats module)
- Uploads data, avatar, smileys, private messages, users, groups
- news 1.54 (instant-zero news module)
- smartfaq 1.08 (FAQ)
- pico 1.6 (5 instances)
- d3forum 0.82 (forums)
- xoopstube 1.03 (video module)
- xpress 2.05 (wordpress for xoops. Later I replace it with wordpress by Mikhail)
- d3downloads 0.82c (download module)
- d3xcgal 0.23 (D3 version of xcGal module)
- xwords 0.46 (based on wordbook module)
- mylinks 1.10
- Above modules data
Things mannually migrated
What I had to re-config on the new site are as following:
- Xoops configuration
- Module preferences
- Block configurations
- Module/Block access permissions
Things left
What I have to or intentionally drop-out are as following:
- article 1.0 (I will replace it with onokazu's Xigg)
- liaise 1.26 (I will replace it with Marijuana's inquiry)
- notifications (I don't use notifications on my site)
What I had done to migrate
1. Backup
I backup my current database. This is not critical in this migration work but you should do it as a good habit when changing things.
$ cd
$ mysqldump -uMYUSERNAME -pMYPASS CURRENTDB > backup.sql
2. Prepare for a new xoops site
I want my current site at http://www.mydomain.com work properly as if nothing happened during the migration. To achiveve this I set-up a new xoops site with the new XOOPS_URL will be http://newsite.mydomain.com and the new XOOPS_ROOT_PATH will be /home/avtx30/newsite
I copy the following files/directories under old XOOPS_ROOT_PATH to new XOOPS_ROOT_PATH: modules, uploads, themes/, and favicon.ico. I like rsync when doing this kind of task.
$ mkdir /home/avtx30/newsite
$ cd ~/newsite/
$ rsync -avh --delete /home/avtx30/html/modules/ .
$ rsync -avh --delete /home/avtx30/html/uploads/ .
$ rsync -avh --delete /home/avtx30/html/themes/ .
$ rsync -avh --delete /home/avtx30/html/favicon.ico .
3. Download and unzip Xoops Cube Legacy
I download XCL version 2.1.4 from xoopscube.org, unzip it then copy the content under its 'html' directory to my new XOOPS_ROOT_PATH except for the fowllowing:
- uploads/
- favicon.ico
Here are the commands:
$ cd
$ wget http://nchc.dl.sourceforge.net/sourceforge/xoopscube/Package_Legacy_2_1_4.zip
$ unzip Package_Legacy_2_1_4.zip
$ cd Package_Legacy/html/
$ rm -rf uploads
$ rm -f favicon.ico
$ tar cf ~/xcl.tar *
$ cd ~/newsite/
$ tar xf ~/xcl.tar
$ rm -f ~/xcl.tar
Also chmod directories for later installation
$ cd ~/newsite/
$ chmod 0777 templates_c/
$ chmod 0777 cache/
$ chmod 666 mainfile.php
4. Create a new database for XCL
I created a new database for XCL and I left the current database as it is. It's safe!
$ mysql -uroot -pMYSQLROOTPASS
> create database NEWDB;
> grant all privileges on NEWDB.* to 'MYUSERNAME'@'localhost' identified by 'MYPASS';
> \q
5. Install the XCL
I open http://newsite.mydomain.com via a web browser and following the instructions to install the XCL with:
- common prefix_TRUST_PATH
- new XOOPS_ROOT_PATH
- new XOOPS_URL
- NEWDB
- MYPASS
- the same tables prefix to the current site
6. Check if the installation OK
During the installation of XCL I was asked for creating an admin account. I create one then login into the newly installed site. I was recommended to chmod the mainfile.php and delete the 'install' folder under new XOOPS_ROOT_PATH. I just did it as recommended.
$ cd ~/newsite/
$ rm -rf install
$ chmod 404 mainfile.php
After that I take time to play with XCL. What I did are:
- Change the site preferences
- Change meta tags, keywords
- Change the default theme to MYTHEME
7. Backup the new site before copying/importing things
I am going to install modules to the new site and import data from the current site. This is a big challenge that I have to backup my newly install site so that I won't have to install it again.
$ cd
$ mysqldump -uMYUSERNAME -pMYPASS NEWDB > newdb.sql
8. Install modules
From the control panel of XCL (the new site) I install all of the modules listed above (Things automatically migrated).
9. Import data
This is the most important step to have my valued data (posts, comments, pm, articles, votes, etc.) with XCL.
I use MySQL command 'show tables' to list current tables in the CURRENTDB.
I selected tables store users, groups, avatar, smileys, private messages, comments
Trích dẫn:
prefix_groups
prefix_users
prefix_groups_users_link
prefix_avatar
prefix_avatar_user_link
prefix_smiles
prefix_priv_msgs
prefix_xoopscomments
and tables that associated with my installed modules. The following list is for news, smartfaq, d3forum, pico, and xoopstube (xoops is my tables prefix). The list is actually much longer.
Trích dẫn:
prefix_stories
prefix_stories_files
prefix_stories_votedata
prefix_topics
prefix_d3forum_categories
prefix_d3forum_category_access
prefix_d3forum_d3forum_access
prefix_d3forum_d3forums
prefix_d3forum_post_histories
prefix_d3forum_post_votes
prefix_d3forum_posts
prefix_d3forum_topics
prefix_d3forum_users2topics
prefix_pico_categories
prefix_pico_category_permissions
prefix_pico_content_extras
prefix_pico_content_histories
prefix_pico_content_votes
prefix_pico_contents
prefix_xoopstube_altcat
prefix_xoopstube_broken
prefix_xoopstube_cat
prefix_xoopstube_indexpage
prefix_xoopstube_mod
prefix_xoopstube_videos
prefix_xoopstube_votedata
It's critical to EXCLUDE these following tables otherwise your new site will be a mess!!!
nbn_banner
nbn_bannerclient
nbn_bannerfinish
nbn_block_module_link
nbn_xoopsnotifications
nbn_config
nbn_configcategory
nbn_configoption
nbn_group_permission
nbn_image
nbn_imagebody
nbn_imagecategory
nbn_imgset
nbn_imgset_tplset_link
nbn_imgsetimg
nbn_modules
nbn_newblocks
nbn_online
nbn_ranks
nbn_session
nbn_tplset
nbn_tplfile
nbn_tplsource
Firstly I imported users, groups, avatar, smileys, private messages, and comments.
Trích dẫn:
$ cd
$ mysqldump -uMYUSERNAME -pMYPASS CURRENTDB prefix_groups prefix_users prefix_groups_users_link prefix_avatar prefix_avatar_user_link prefix_smiles prefix_priv_msgs prefix_xoopscomments > user_etc.sql
$ mysql -uMYUSERNAME -pMYPASS CURRENTDB < user_etc.sql
After that I check if the data successfully imported.
Check if users are imported properly by logging-out then logging-in with my accounts at current site (not the one create in step 6 at the new site)
Check Avatar at: new XOOPS_URL/modules/user/admin/index.php?action=AvatarList
Check Smileys at : new XOOPS_URL/modules/legacy/admin/index.php?action=SmilesList
Check private messages at new XOOPS_URL/viewpmsg.php
Check comments at new XOOPS_URL/modules/legacy/admin/index.php?action=CommentList
Secondly I import modules data:
Trích dẫn:
$ cd
$ mysqldump -uMYUSERNAME -pMYPASS CURRENTDB prefix_stories prefix_stories_files prefix_stories_votedata prefix_topics prefix_d3forum_categories prefix_d3forum_category_access prefix_d3forum_d3forum_access prefix_d3forum_d3forums prefix_d3forum_post_histories prefix_d3forum_post_votes prefix_d3forum_posts prefix_d3forum_topics prefix_d3forum_users2topics prefix_pico_categories prefix_pico_category_permissions prefix_pico_content_extras prefix_pico_content_histories prefix_pico_content_votes prefix_pico_contents prefix_xoopstube_altcat prefix_xoopstube_broken prefix_xoopstube_cat prefix_xoopstube_indexpage prefix_xoopstube_mod prefix_xoopstube_videos prefix_xoopstube_votedata .......... > module_data.sql
$ mysql -uMYUSERNAME -pMYPASS CURRENTDB < module_data.sql
10. Config the new site
After step 9 I started to config my new site so that it looks exactly the current site. When done, I swap the paths and change the mainfile.php so that my new site will be accesss from http://www.mydomain.com.
Swap the paths:
$ cd
$ mv html html-oldsite
$ mv newsite html
Change the mainfile.php under html directory:
Before
Trích dẫn:
- XOOPS_ROOT_PATH = /home/avtx30/newsite
- XOOPS_URL = http://newsite.mydomain.com
After
Trích dẫn:
- XOOPS_ROOT_PATH = /home/avtx30/html
- XOOPS_URL = http://www.mydomain.com
With this structure I can easily swap the sites: the old (ImpressCMS) and the new (Xoops Cube Legacy). I found that it's the safest way for me.
English is not my first language. I tried to write but I don't know if you can understand. Questions, comments are welcomed. I am happy if this could help some of you who are trying to reach XCL.
Votes:0
Average:0.00
|
Xóa mù Linux |
Tài liệu kỹ thuật |
How to upgrade to XCL from XOOPS 2.0.x / ImpressCMS |


