• How To Convert 20 Domains with Blogs into 3 Domains with Subdomains – in Six Hours

    0
    scissors
    October 6th, 2007HARTHART-Empire Network

    A Consolidation and Reorganization is in Progress

    October 16, 2007 will mark my second Blogiversary since I started the HART-Empire Network back in October 2005. As a present to myself, I thought I would do a consolidation of my network to better centralize certain themes that I perceive to have, and hopefully to better brand myself and my network. To this end, I have created new domains and have moved the following domains into subdomains of the new domain:

    (OLD URL) >> (NEW URL)

    * “BATTLING FOR HEALTH” (health related sites)

    http://Battling-Addiction.com >> http://addiction.BattlingForHealth.com
    http://Battling-Alzheimer.com >> http://alzheimer.BattlingForHealth.com
    http://Battling-Cancer.com >> http://cancer.BattlingForHealth.com
    http://Battling-Depression.com >> http://depression.BattlingForHealth.com
    http://Battling-Diabetes.com >> http://diabetes.BattlingForHealth.com
    http://Battling-HeartandStroke.com >> http://heart.BattlingForHealth.com
    http://Battling-MS.com >> http://ms.BattlingForHealth.com
    http://Battling-Obesity.com >> http://obesity.BattlingForHealth.com
    http://Battling-Schizophrenia.com >> http://schizophrenia.BattlingForHealth.com
    http://Battling-Stress.com >> http://stress.BattlingForHealth.com

    * “AND YOU WILL” (self-improvement related sites)

    http://AndYouGarden.com >> http://garden.AndYouWill.com
    http://AndYouHaveKids.com >> http://kids.AndYouWill.com
    http://AndYouMarry.com >> http://marry.AndYouWill.com
    http://AndYouRenovate.com >> http://renovate.AndYouWill.com
    http://AndYouRetire.com >> http://retire.AndYouWill.com
    http://AndYouPlayPoker.com >> http://poker.AndYouWill.com
    http://AndYouTravel.com >> http://travel.AndYouWill.com

    * “@ HART MARKET” (shopping and product related sites)

    http://Medieval-Site.com >> http://medieval.HARTmarket.com
    http://The-Furniture-Site.com >> http://furniture.HARTmarket.com
    http://The-Lingerie-Site.com >> http://lingerie.HARTmarket.com
    >> plus a new one! >> halloween.HARTmarket.com

    * I haven’t yet reorganized these sites yet, but I will before 2008~

    “HART” Stuff – (the ME sites) // 1800HART, callHART, HARTandYVONNE, HART-Oscope, etc
    “PETLVR” Stuff – (For all earthlings who love animals) // PetLvr, DogLvr, CatLvr, etc
    “Everything Else” – (non-blogs, forums, lyrics, directory, topsites, etc)

    Consolidation is a daunting challenge

    Quite honestly, the end result is not what I first wanted. I wanted to have subfolders attached to each domain because, for me personally anyway, it’s easier to type … BattlingForHealth.com/cancer/ than it is to type cancer.BattlingForHealth.com. But, I couldn’t get the 301 redirect to work. And, you want a permanent redirection to work to let the search engines know that you have moved your site, and to maintain the link popularity that may be accruing to e.g. the sponsors who I thank in my blogs every month.

    The only way I could get this to work was to use Subdomains.

    Preparation Work – Tools

    Before I give a detailed description of exactly how I managed to move 20 blogs in about 6 hours (about 20 minutes per blog) .. here are the tools or “stuff” that I personally used. They may not apply to your situation, if trying to follow this. I should also mention, that afterwards, I upgraded each of the 20 blogs from the existing version to the latest wordpress version 2.3

    * Access To The Root

    I’m on a dedicated server .. with WHM access for the root, so I am able to create accounts easily. When I was on the Virtual Private Server (VPS) I had access to SSH but I didn’t on the WHM. But, there’s a program called “PuTTy” which I got from here: the.earth.li/~sgtatham/putty/latest/x86/putty-0.60-installer.exe that I can log into the root and perform Secure Shell access stuff. Besides being able to create new accounts, it helps if you are able to modify (chmod) permissions quickly.

    * cPanel access to the individual accounts

    Besides being able to create subdomains for the new account and setup email accounts, I was accessing the MySQL databases and phpMyAdmin

    * FTP Program

    I use and prefer and old copy of WS_FTP_LE that I have had for years. I also have FileZilla but rarely use it. I have my WS_FTP software setup to edit files using NotePad and that makes it quite easy for me to make changes to .php and .txt files, easy to ftp files back and forth to the server, and able to change the permissions of certain files easily.

    * I created a local folder of all the latest plugins I wanted

    I went through all of my blogs and determined what plugins I really need, and what is compatible with the latest version of wordpress 2.3. This was tough for me, because on some blogs I have over 50 plugins activated, and with the new issues with plugins and tagging on wordpress 2.3 .. I really had to think about just what I really wanted and what I really need. In the next section, I’ll list my final choices. Right now – all 20 blogs have been converted to include these plugins. Some blogs might be a little screwy, for instance, if it was using a different plugin for a Contact Form, and I switched it during the upgrade. I figure I will eventually fix everything up in the next month or so.

    * Make A Checklist

    With all the many sites that I had to convert, I didn’t want to forget a step and miss anything. Although, after about the 6th blog conversion I was getting quite proficient at that, I found it quite helpful to make a checklist to be sure I did everything for each account. After a while, I was multi-tasking and converting 2 or 3 at a time. Here is my simple checklist.

    OLD URL ______________
    NEW URL ______________
    VERSION ______________
    HTACCESS ____________
    TAGGING ______________
    RSS FEED _____________
    POSTING _____________

    My Final List Of WP2.3 Plugins I’m Using – Starting Point

    For now, I know I will probably add and test more plugins as they are created, but here are the ones that I setup and placed efficiently on my local C: drive = just as it would eventually end up in my /wp-content/plugins/ folder in each subdomain

    c:\2007_Latest_Wordpress\plugins\

    1) Akismet 2.0.2
    2) All in One SEO Pack 1.2.8.1
    3) Auto-hyperlink URLs 2.01
    4) Auto Social Poster 3.0
    5) Bad Behavior 2.0.10
    6) Evermore 2.2
    7) Exec-PHP 3.0
    8) Feedburner Feedsmith 2.2
    9) Full Text Feed 1.04
    10) Google XML Sitemaps 3.0
    11) InstantUpgrade 0.2
    12/13/14/15) Semiologic Related Plugins 2.14
    16) Share This 1.4
    17) Smart Archives 1.9.1
    18) Spam Karma2 – 2.3 rc4
    19) WordPress Database Backup 2.0
    20) Admin Bar Reloaded for 2.1x
    21) Subscribe to Comments 2.1.1

    That’s it. I’ve deleted all the Firestats, which were popping up as NOT installed ever since I’ve upgraded to wordpress 2.2.3 and will be moving to Performancing Metrics plugin

    22) pMetrics 1.0

    I still need plugins for my recent posts and recent comments, and I’m debating which plugin to use for a Comment Form (Contact Form) as there are several options out there – with akismet and spam control. There may be fine tuning to this list and a dynamic process, not static. I expect changes over time anyway.

    DISCLAIMER: This may or may not be the proper way to do things, and I do not proclaim this to be the best way to do this either! PLEASE! I caution everybody to be remember that this is the way HART did this, not the way YOU should do this. However, after saying this .. I hope that my efforts in documenting what I have done helps others accomplish what they need to be done

    STEP ZERO: Create The New Account!

    It is assumed that you have already registered an account and a cPanel exists. In my examples I will refer to the move of Battling-Cancer.com (cPanel account called “cancer”) to a new account at cancer.BattlingForHealth.com (cPanel account called “health”). MySQL databases are usually named and associated with the cPanel account, and if one exists it would have been called “cancer_wpcancer” or something like that. When I created the new health cPanel account, I did NOT create any new MySQL databases .. just new subdomain, like ‘cancer’. After I created the subdomain – the URL would be cancer.BattlingForHealth.com and the real location on the server was .. /home/health/public_html/cancer/ (a location appearing to be BattlingForHealth.com/cancer/). If I were to create a new MySQL database, it would look something like “health_wpcancer” .. but I didn’t do that. The new account will be using the same database “cancer_wpcancer” and the database will not be moving – just the URL and location will have changed.

    STEP ONE: Backup MySQL Database of the OLD URL

    consolidate-step01.jpgWith the WordPress Database Backup plugin, under Manage in the blog, I made a backup of all tables and stored it on the server. I chose to save it on the server instead of emailing it to my gmail account, because I could easily, with my WP_FTP program .. be sure it was a complete backup and look at it before changes were made.

    STEP TWO: Change the URLs in the OLD blog

    consolidate-step02.jpgIn the old domain, which I was changing, I went into the wordpress OPTIONS/GENERAL and changed both the “WordPress address (URL):” and the “Blog address (URL):” to the NEW URL that the blog would eventually be moved to. I also changed the name title and tagline to reflect the new name. When you click the UPDATE button, you will be kicked out of the blog and receive an error message – that’s okay~!

    STEP THREE: Backup (FTP) ALL of the files to your local directory

    In the current example, I just created a NEW folder for the new subdomain, and FTP’ed everything over into the new folder. I already had an old folder exist, but I ignored it. As an example, I backed up via FTP all the files in the /home/public_html/cancer/*.* to my local c:\BattlingForHealth\cancer\folder.

    STEP THREE-AND-A-HALF: Multitask to speed things up if you want to!

    Basically, I was consolidating two domains at a time, because some of them had a lot of files, pictures, plugins, etc and it cut the time in ‘half’. While the first domain was FTP’ing to my local drive, I worked on the second domain in another tab and then opened up a second version of my WS_FTP program and started to ftp the second set of files simultaneously.

    STEP FOUR: Combine Your New Plugins with your Files

    It was much easier to just copy that newly created folder of the c:\2007_Latest_Wordpress\plugins\
    to the ../wp-content/plugins/ files I just copied over via FTP with my windows explorer. What took about 20 seconds that way would have taken about 3-5 minutes uploading it via FTP. This was especially so, doing two domains at once!

    STEP FIVE: Upload (FTP) The Backup Files to the New Subdomain/Folder

    I then uploaded all of the files from my hard drive, that had updated versions of all of the plugins for wordpress 2.3, to the new subdomain

    STEP SIX: Set The Permissions Accordingly

    I did this all in one step at this time. My blogs were currently on wordpress version 2.2.2 or 2.2.3 and was being updated using the INSTANTUPGRADE plugin. For this plugin, you have to basically chmod everything to full read/write/execute permissions .. and then let the plugin take control of the permissions as it updates, and then places the proper permissions back on the files that are needed. So – if you are following my steps, be careful to do this in a short period of time.

    Using my WS_FTP_LE program, I chmod the root sub-directory where the wordpress blogs is located to 777, or rather to where all the Owner, Group, and Other settings are allowed for Read, Write and Execute .. as my FTP program is old and doesn’t allow me to just type in the permission setting. I set the permissions to the following
    /cancer/ (the subdirctory root folder)
    /cancer/.htaccess
    /cancer/all the wordpress and other files in the directory, except wp-config.php. This included any sitemap.xml files that may have existed. DO NOT change the permission on the wp-config.php file, because this is one of the files that the InstantUpgrade ignores and does not take control of.

    Using my PuTTy program, I logged into my server’s IP address and logged into the root of the dedicated server. I had to set the permissions to chmod 777 on all files, and it takes too long to do in the FTP program, because you can only do one directory view at a time. With the PuTTy program, you can chmod a directory “recursively” which also sets the permissions for all files including subdirectories. The commands in PuTTy to do all of this was..

    chmod 777 -R /home/public_html/cancer/wp-admin
    chmod 777 -R /home/public_html/cancer/wp-includes

    I believe the “-R” has to be in capitals to work. I also did the content folder
    chmod 777 -R /home/public_html/cancer/wp-content
    .. as I need to do it anyway for the cache, backup, theme and the ‘work’ folder for the InstantUpgrade.

    STEP SEVEN: Log In And Update The Permalinks

    Now, in the new subdomain of the moved blog, login and then go to OPTIONS/PERMALINKS and click Update. The settings should be unchanged from the old blog when you go to the screen. It was not recommended to change the structure of the permalinks from what it used to be, but afterwards I found out that it probably wouldn’t have made a difference if I did change the structure, as long as I clicked the Update Permalinks button afterwards.

    STEP EIGHT: Update the Plugins

    In the Plugins .. you should see all the newly updated plugins that were included, and may or may not be activated. You will probably see a lot of the other plugins activated too. What I did, was deactivate all the plugins that were not in my “updated” list on my local hard drive .. and then activated any new plugins that did not exist for the blog yet. At this present time, I have later gone to each site via FTP and deleted the plugins that I am not using, but haven’t modified some necessary results of my new plugins. For instance, on some older domains, I was using one plugin for archives – and I have decided to go with a new plugin that is more user friendly, so I still have to check all the pages and codes that are setup. But .. I will get around to that.

    STEP NINE: Backup The Database

    Once the proper plugins are all activated (for use in wordpress 2.3) .. I performed another backup of the database through MANAGE/BACKUP function, saving the backup on the server. After the backup was made, I set the backup to be made automatically every day and have it emailed to my gmail account.

    STEP TEN: InstantUpgrade

    I performed the InstantUpgrade function .. MANAGE/INSTANTUPGRADE. As I have already set all the permissions, and have a backup – everything should be ready to be upgraded to the “Latest” wordpress. I would suggest that if you are upgrading from 1.5+ version .. only upgrade to 2.0. Then, if you are on 2.0 version, only upgrade to 2.1. And if you are on 2.1, first upgrade to 2.2 version. Then once you are on the 2.2 version upgrade to 2.3.

    I had a serious problem upgrading my PetLvr blog with my archives from 1.5.2 directly to version 2.1, and I think the above is the best way to go. Besides, it takes only a few seconds each time too – so, it shouldn’t be a biggie. By the way, after the upgrade, all the permissions should be back to normal automatically and not a security risk anymore.

    STEP ELEVEN: Make my Blog Tag-Ready to work with TAGGING

    Basically, my blogs all had Ultimate Tag Warrior plugin and some even had Bunny’s Tag installed, but I would have deactivated these plugins by now. On a few of my older templates, I actually had to go in the template and remove the call to the Bunny Tags in the main index.php template and in other cases with my FTP it was easier to just delete the UTW folder directly from the plugin folder online.

    In the Dashboard, go to MANAGE/IMPORT/ and there are two new things to import:

    – Bunny’s Technorati Tags
    – Ultimate Tag Warrior

    In my footer or sidebars, I replaced any UTW code with the following to make a simple tag cloud work until I can figure out a better way to display the tags and categories!


    KEYWORDS - Related Topics & Tag Cloud:
    < ?php wp_tag_cloud(''); ?>

    STEP TWELVE: Set up 301 Redirect in the OLD Domain URL

    At the old location, via FTP .. I converted the existing .htaccess files to the following, overwriting what was there before. I just made the edit in Notepad, modified the domain names and the FTP it to the OLD domain in less than a minute. In this example, I’m changing the .htaccess of Battling-Cancer.com to redirect everything to cancer.BattlingForHealth.com. And, that’s all that had to be done with that file.


    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /

    RewriteCond %{HTTP_HOST} !^battling-cancer.com\.com$ [NC]
    RewriteRule ^(.*)$ http://cancer.battlingforhealth.com/$1 [R=301,L]

    RewriteCond %{HTTP_HOST} !^www\.battling-cancer.com\.com$ [NC]
    RewriteRule ^(.*)$ http://www.cancer.battlingforhealth.com/$1 [R=301,L]

    I noticed that my AutoHyperLink plugin is changing the above code to remove the http:// so, I took a screen image to show you what the code is for the .htaccess file on the old server:

    hta-code-301.jpg

    STEP THIRTEEN: Update My Feedburner Account

    All my feeds are routed using the Feedburner-Feedsmith plugin and are under control at Feedburner.com. What I did was login to each of my accounts, after the above upgrade, and edit the feed details to change the name of the blog, if necessary, and change the source feed from e.g. Battling-Cancer.com/feed/ to cancer.BattlingForHealth.com/feed/. As the actual feedburner URL doesn’t change, those readers with my feed in their feed reader or Bloglines or Google Reader won’t even notice anything. For those who don’t use a feed reader, the permalinks will just take over.

    STEP FOURTEEN: A Quick Post to let people know that you have moved – Sort of.

    I just basically did a quick post on each blog, replacing applicable URL’s .. so readers won’t have to wonder what happened with the changing of any name and the URL of my domains. It’s just polite to do that.

    STEP FIFTEEN: A Final Thought about Addon Domains

    When everything is done and upgraded .. I have two accounts on my server. Naturally, it will be the new subdomain blog that I will be making upgrades, new plugins, theme modifications .. but it is still a duplicate copy of the files in the original domain blog. You have to remember two things now:

    1) both accounts are sharing the same MySQL database where all the information is.
    2) if you delete the old cPanel account, the MySQL database will automatically be deleted and there is nothing you can do about it!

    I’m setting up “Add-on Domains” to each subdomain, and associating the old domain cPanel accounts to the subdomain. This should help me to NOT accidentally delete the entire blog in a blink.

    When I first started this process, I tried the built-in IMPORT/EXPORT feature of wordpress, but what a crap that turned out to be. It imports everything fine – but, exactly as it was in the old blog. There were a few blogs of mine that had TONS of pictures added to each post (like my Obesity blog), and the imported information just links back to the old domain! So, If I would have created new MySQL databases for each new subdomain – it would have taken MUCH more time to import the data, and then once I delete the old cPanel, all the pictures and links would not be working anymore! Very frustrating. I actually wasted about 3 days finding that out!

    CONCLUSION

    I hope the above steps helps gets your thoughts organized and helps you to convert to wordpress 2.3 or move your blogs from domains to subdomains, or even from domains to subfolders in the existing domain. The same instructions should work for either situation – but, remember that I am writing about what I did for my network, and this might not be suitable for your situation and definitely not every situation.

    Take care // HART

    Related Posts with Thumbnails
 

1 responses to “How To Convert 20 Domains with Blogs into 3 Domains with Subdomains – in Six Hours” RSS icon


5 Trackbacks / Pingbacks

Leave a reply