There are some who might question my sanity for taking a popular, fully developed, well-indexed site, stripping it and moving to an entirely different platform, with an entirely different structure. I would like to answer this question now as well as provide some information on how I went about this transformation.
1st - To answer the *why* question… in a brief history lesson…
A lot of people know that MyWebResource started out as my personal bookmarks site. A place where I could store information I was gathering about web design. When your Firefox bookmarks hit over 2MB, you know it’s time for a better model. Hence the birth of MyWebResource.
As I added more stuff to the site and started releasing my designs here, the site organically gained in popularity, and at its peak, was one of the top 50,000 sites in Alexa, was 1st in Google for a few webmaster related keywords and was serving up over 500,000 page views per month. Then the bottom fell out and right now, this site is at about 1/2 the traffic of it’s golden days.
So, what happened? Well, I grew increasingly involved in XOOPS and Management. This took my time away from developing this site. It started to become static. Eventually, it got to a point where I was only spending a couple hours, at best, on this site each week.
During this time, I discovered Wordpress and fell in love with it. For quite some time, I alternated rolling out XOOPS sites and Wordpress sites depending on the need of the job. You know, the right tool for the job. When this site got to the point it was overloading its hosting account, I did some digging and found that inefficient queries were the culprit and was faced with a choice. Get a bigger sledgehammer or switch platforms.
By this time, I knew enough about Wordpress that I felt it was the best tool for the job given the nature of this site and the niche targeted. However, as a senior member in XOOPS, I couldn’t roll out a competitor product on my flagship site, so I got a bigger sledgehammer. A very nice VPS from Future Hosting.
After almost 2 years of involvement in the upper ranks of XOOPS, some major changes took place and some personal matters forced me to re-evaluate my role in XOOPS and the time I was investing online. As a result, I left XOOPS. It is a chapter in my history I will cherish, but do not wish to repeat.
Now that I am no longer entangled in the XOOPS organization, I’m free to use whatever tool I wish to build my sites without concern of the “image” it would create. Yes, I still use XOOPS on some sites as it is still a decent tool for certain sites, but for most sites I build, Wordpress is the superior tool and has become my default choice. Hence, the migration of MyWebResource to Wordpress.
I’m already being long-winded here, so I’m not going to go into the Pros/Cons of Wordpress vs XOOPS. The majority of visitors here are experienced enough to know the major factors why I would make such a dramatic change, so I will not go into such a discussion.
2nd - To answer the *how* question…
Well, to be honest, when the migration process started, I knew Wordpress *could* do the job, but I had no plan of *how* I was going to do the job. Normally, I don’t tackle such major jobs in such a cavalier fashion, but at the time, let’s just say my vision was blurred with a bit more than a little frustration.
Ok, now that you’re half asleep with the history lesson, let’s move on to the good stuff.
A few assumptions made here.
1. That you know to backup your database before even thinking about trying this.
2. That you know the basics of phpMyAdmin and SQL (we’re talking real basic here).
3. That you will test this out on a test site before using it on a live site.
4. That you are migrating from XOOPS 2.0.16 to Wordpress 2.2.1.
5. That you wont blame me if you pooch your site. I warned you to backup your database!
So, the key points…
User account Migration
OK, by far, this was one of the easiest steps. Thanks to some Googling and this post on Moving from XOOPS to Wordpress, the basic steps for matching up the tables was given and with this information, the following SQL query was created.
SELECT `uid` AS `ID`, `uname` AS `user_login`, `email` AS `user_email`, `url` AS `user_url`, `pass` AS `user_pass`, `name` AS `user_nicename`, `actkey` AS `user_activation_key` FROM `prefix_users`
The result set was then exported as a standard csv file with commas separating columns and values surrounded in quotes. The result set was then imported into Wordpress without any muss or fuss. Since XOOPS and Wordpress both store passwords as an MD5 hash, this was a quick fix for moving a few hundred users in just a couple minutes.
That’s where the easy part ended for this MySQL n00b.
Link Directory Migration
The next step was to migrate over the large collection of resources in the old link directory. The first challenge was finding a comparable link directory plug-in that was good enough for the job. Enter the WP Link Directory.
Now this plug-in is good and I like it, but I had to fix some validation issues and some minor irritations to get it to work the way I wanted, but in the end, it’s the best tool I could find for the job and thus is used here.
Now the fun part… Moving over 500 links, descriptions and titles from 2 tables to the new structure. This was a two step process and I had to enlist the help of one of my more skilled friends to figure out the proper SQL syntax.
1st step - get the basic result set…
SELECT `title` AS `title`, '1' AS `active`, '1' AS `nonreciprocal`, `url` AS `url`, `cid` AS `category`, `description` AS `description`, 'no-reply@pkbcs.com' AS `email`, 'http://' AS `reciprocalurl`, '1' AS `status`, `date` AS `time` FROM `7qTGj_mylinks_links` a LEFT JOIN `prefix_mylinks_text` b ON a.lid = b.lid WHERE cid != '20'
2nd step - fixing the categories…
I had to match up the manually created categories in the new directory and execute the following SQL for each category…
UPDATE `prefix_eblex_links` SET `category` = 'juuack5u2xdxqevaeyewhe42csb3r2ah' WHERE `category` = '1';
The hash for each category is unique, so a little time flipping between 2 databases in phpMyAdmin was necessary.
Other than finding a suitable theme and some other useful plug-ins, that’s where the easy part ends.
Download Migration
I had already provided a rather simple solution for downloads by archiving the old site then displaying the raw files in an IFRAME using AutoIndex. This will be replaced with a more elegant solution later, but my server logs suggest that people are having no problems with this quick fix, so it will work for now. Good thing I have a 500GB limit.
News Feed Migration
The RSS feeds or “Webmaster News” that was on the old site was a biggy. A lot of people frequented MyWebResource because of the centralized news. In fact, MyWebResource still ranks 3rd in Google for the search term Webmaster News. It was a no brainer that I had to migrate this section of the site, but how?
There are a few tools that allow you to parse RSS feeds in Wordpress, but honestly, most of them are either outdated, or suck. I first settled on Feedlist, but unfortunately, it was buggy and worked unpredictably with Wordpress 2.2.1. I found this out after creating 30-some pages for each feed.
Then, I stumbled upon BDP RSS Aggregator. After 30 minutes with this plugin, I heard bells and angels singing! It was the perfect tool for the job. I haven’t figured out all of its features yet, but I’ve figured out enough to seriously streamline how this site presents news feeds. I love it!
How I got the data over isn’t so impressive. Good ol’ copy and paste got the job done. Perhaps there was a better way, but I had my fill of SQL for one week and just wanted to get it done. Within an hour, I had completely restored the functionality I wanted using BDP RSS Aggregator. That’s good enough for me!
Tools Migration
As far as the Tools section goes, it’s no secret that all of them are 3rd-party tools. The goal of this site always has been to feature 3rd-party resources in one place so that webmasters didn’t have to visit several sites to get the information and tools they needed to get the job done. That being said, the Tools section was seriously out of date, so I spent the hours needed to manually recreate it with many new tools added.
I’m still looking for tools that webmasters will benefit from, so if you have a tool that can be added here via a form or an IFRAME, please suggest it.
Now, what I couldn’t do…
The Article module I was using, SmartSection is by far my favorite module for XOOPS and it is the tool I will miss the most. However, 1 module is not enough to justify using the wrong platform for the job, so, I have to find a solution.
Using the methods mentioned above, I spent several hours trying to figure out how to migrate the data. Simply put, my limited SQL skills are not enough for the task. The SmartSection tables are split in such a way that I cannot get them to match up cleanly with the Wordpress tables. Not to mention the fact that XOOPS uses BBCode and (as far as I know) Wordpress does not. Therefore, I cannot migrate that data.
Initially, I started hand moving the articles using copy/paste. After 2 hours and only a few articles, I realized this was a bigger task than I can handle. The temporary solution I’ve implimented is to remove all duplicate content from the old site, lock it as read-only, and link directly to it. This is a VERY ugly solution, but until I can afford to hire someone to migrate the data or I learn enough SQL to do it myself, this will have to be the way it is done.
If any of you SQL Gurus want to contribute to this site by teaching this SQL n00b how to do complex SQL conversion, I’m all ears and your help would greatly be appreciated and credited!
In closing… Hey! You! Wake Up! No snoring on my articles!
A LOT has changed, but a lot will stay the same. What you see now at MyWebResource is the framework. Much will change over time and what you see here will most definitely become more interactive and user-friendly.
By using Wordpress as the platform for the new MyWebResource, contributors will gain the benefit of a tool that is infinitely more search engine friendly while users will certainly benefit from a site that is more intuitive, user-friendly, and accessible.
I hope you all like the changes being made around here. As always, your feedback and suggestions are greatly appreciated and help make MyWebResource YOUR Resource. If you have any feedback or suggestions, please do let me know.
Thank you all for your patience and encouragement during this time. Here’s to an exciting new chapter in the history of MyWebResource.
Cheers!











July 8th, 2007 at 1:37 am
Nice lengthy article, I’m sure many will be following in your foot steps soon
July 8th, 2007 at 1:51 am
LOL… yeah, I guess I was a bit long-winded, but its a topic I had to explain a bit.
Whether people follow or not is not my concern. I’m not saying people *should* follow. I am saying how I did it. If others see what I see and believe what I believe and want to do the same, I hope, in some small way, the above information will help them.
July 9th, 2007 at 6:52 pm
[…] There are some who might question my sanity for taking a popular, fully developed, well-indexed site, stripping it and moving to an entirely different platform, with an entirely different structure. I would like to answer this question now as well as provide some information on how I went about this transformation. (more…) […]
July 12th, 2007 at 11:17 am
Slowly moving my site too. I would like to thank you for the article, it helped me a lot to move my existing users.
In search for a simple one, I planned to move long time ago but my zero knowledge with PHP and MySQL was keeping me not to move. Site is almost done with 2 more things to migrate, directory entry and gallery.
July 12th, 2007 at 11:30 am
Glad to hear you’re having some success! The link directory script used here is pretty decent, but not as good as what was available with XOOPS.
As part of my job, I’m going to be taking some PHP and MySQL classes this fall. I know some basic now, but I want to extend those skills enough to start writing plugins for Wordpress. I’ll be going through the Wordpress documentation and learning how to code for WP.
Once I get up to speed, expect to see WP plugins and themes released here that will further aide XOOPS users to successfully migrate to Wordpress.
XOOPS is a good system, as far as it goes, but I prefer to have options that meet the needs of my clientèle. WP is a better fit for most of my clients. Once you get use to using WP, it’s a lot easier to use and optimize as well, IMHO.
July 14th, 2007 at 6:02 pm
Hi James!
This is great! I have been tinkering in words press for a time myself and will be moving my xoops site into it eventually. This will be really helpful. Thanks
July 14th, 2007 at 6:37 pm
Great! Glad it will help!
I gotta be honest, the more I use Wordpress, the more I love it. For basic usage, you can be lazy with it and it gives great output. For advanced implementations, you have to be more skilled to get the same results as you would with XOOPS, but the output is much better (standards compliant) and the database load is significantly lower.
With some time and good ol’ fashion T&E, I think you’ll love it too.
July 15th, 2007 at 10:22 am
Glad to see you among the WordPress lover’s
Great job on porting over the site.
July 16th, 2007 at 4:50 pm
Hi James, thanks for this article. I’m using both, WP and XOOPS for some years now. Some friends actually asked for help to port users to WP which i was not able.
Michael
July 16th, 2007 at 5:12 pm
@MsDana: Thanks!
It’s been a learning experience, but I’m having fun again. Something I couldn’t say for almost 2 years now.
@Michael: Ironically, your use of WP on your site was one of my inspirations for learning about it. You know I’m a big fan of your work.
The user accounts were a breeze. It’s everything else that’s taken a lot of work. Nevertheless, IMHO, it has been well worth it.
July 16th, 2007 at 11:27 pm
There are some modules that I like in Xoops but my vistiors aren’t really using them so I decided to have a simple one. One thing that my visitors love to have again is the shoutbox. I found really good one but can’t restrict it to members only, it has limitation on checking members username so guest can post using members name by just changing the letters to upper/lower case. http://blog.jalenack.com/ajax/
Good luck on your studies and I am looking forward to your plugins.
BTW, what plugin you use for your directory and subscription?
July 16th, 2007 at 11:50 pm
Harry,
The link directory is from http://www.ebrandmarketing.com.....directory/
It’s a bit buggy with WP 2.2.1 and has some XHTML issues that can break your layout. Also, it doesn’t seem to utilize much of the core and search functionality. Still, it’s the best directory I could find in a short time that I could migrate roughly 500 links to relatively easily.
If I had to choose 1 plugin I’d like to do first, a well-integrated directory plugin would be it.
The subscription plugin is from http://subscribe2.wordpress.com/ . I’m still relatively early in testing it, and I’ve already found that you have to do a manual edit to subscribe2.php to keep from getting your site blacklisted, but all in all, I’m pretty impressed with it.
There have been a couple minor bugs that have come up, but I’m waiting until I thoroughly learn the plugin and ensure that it isn’t user-error before reporting the bugs to the author.
I too like the idea of a permissions based shout/chat box. For some communities, this is an essential element.
Given the enormous functionality and flexibility of WP, I have to constantly remind myself that it is a blogging platform. However, as more developers are attracted to the flexibility of this platform, I think the line between Blog and CMS will further blur and WP will become more of a Framework for building custom applications. Much of the tools are already in place. It’s just a matter of learning how to use them.
July 30th, 2007 at 1:46 am
After I ran the SQL query and tried to export, the only thing that came out in the file was an export of the xoops table. I already have that. After running the queries, how do we get the data out of phpMyAdmin so that we can import it into the wordpress table(s)?
I’m confused.
July 30th, 2007 at 3:38 am
Also, how do you get the topics (categories) for the stories from Xoops to wordpress??
July 30th, 2007 at 12:50 pm
RE: Exporting…
After you perform your query and get your result set, click on the Export button in the “Query results operations” box. In the “Export” box, you have several options, choose the CSV option and change the “Fields terminated by” to a comma (,), and change the “Fields enclosed by” to a quote (”). Then check “Save as file” and click the “Go” button.
Now open the file and insert a new row above the data you just exported. In that new row, insert the matching WP column values. Your original query contains the values you need to use. Once you have added the column names, go back to phpMyAdmin in your WP database.
!IMPORTANT!: Make a backup of your database before you try this!
Select the table you wish to import the data into, then go to the “Import” tab. Browse for the CSV file you saved earlier, select CSV under “Format of imported file”, set “Fields terminated by” to a comma (,), set “Fields enclosed by” to a quote (”), then, in “Column names”, add the column values, in order and separate them with a comma. Do not use spaces. Depending on whether you have a blank WP DB, or if you are adding to an existing DB will determine whether you want to select the option of “Replace table data with file”. Once you’ve done the above, click “Go”.
If all steps have been performed properly, your data will be added without issue.
RE: Also, how do you get the topics (categories) for the stories from Xoops to wordpress?….
That depends on what modules you are using. The basic SQL is SELECT `cid` AS `category` for mylinks. The first value is the XOOPS column name. The second column is the WP column name. Just determine what the category column name is for your module and adjust the SQL.
HTH.
July 30th, 2007 at 3:58 pm
Thank you SO much for your reply!
I also received some advice from someplace else and this was my resulting sql looked something like this:
_____
INSERT INTO wp_users (ID, user_login, user_pass, user_nicename, user_email, user_url, user_activation_key)
SELECT `uid` AS `ID`, `uname` AS `user_login`, `pass` AS `user_pass`, `name` AS `user_nicename`, `email` AS `user_email`, `url` AS `user_url`, `actkey` AS `user_activation_key` FROM `xoops_users` WHERE uid > 1;
_____
That actually worked! By the way, I have both Xoops and WP in the same database table.
However, when it comes to the xoops_stories table, Xoops has one table for the stories (xoops_stories) and another table (xoops_topics) for the categories. I used something like this to get the stories into wordpress:
______________
INSERT INTO wp_posts (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_category, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_content_filtered, post_parent, guid, menu_order, post_type, post_mime_type, comment_count)
SELECT `storyid` AS `ID`, 1 AS `post_author`, FROM_UNIXTIME( published ) AS `post_date`, FROM_UNIXTIME( published +43200 ) AS `post_date_gmt`, `bodytext` AS `post_content`, `title` AS `post_title`, 0 AS `post_category`, `hometext` AS `post_excerpt`, `published` AS `post_status`, `closed` AS `comment_status`, `closed` AS `ping_status`, ” AS `post_password`, `storyid` AS `post_name`, ” AS `to_ping`, ” AS `pinged`, FROM_UNIXTIME( published ) AS `post_modified`, FROM_UNIXTIME( published +43200 ) AS `post_modified_gmt`, ” AS `post_content_filtered`, ” AS `post_parent`, ” AS `guid`, ” AS `menu_order`, ” AS `post_type`, ” AS `post_mime_type`, 0 AS `comment_count` FROM `xoops_stories`
_______________
But nothing’s showing up because I can’t figure out how to get the categories. Should I already have added the categories manually in Wordpress first??
July 30th, 2007 at 4:00 pm
Above should read: “…I have both Xoops and WP in the same database.”