Moving A WordPress Blog To A New Host

I facilitate several WordPress blogs, several of which I installed on DiscountASP.NET.  I wrote a blog about the process, and then as now it felt like I had to shoehorn WordPress onto their system.  I, as well as others, began to have problems administrating our blogs (notably, difficulties adding plugins or upgrading versions).

I’ve also hosted a number of domains with Applied Innovations, and I knew they added some new capabilities and a crazy new plan for Webmatrix hosting, especially ensuring the right capabilities for WordPress and other WAMP stack applications (such as Joomla, Drupal, and so on).  Better pricing and the right features-it was time to migrate.

I migrated two blogs today using the steps below, and I’m going to migrate a couple others as their current hosting nears expiration.  Moving a WordPress blog involves moving both files and a database; each has its own method.

There are a number of ways to backup and restore a WordPress blog.  The official documentation is http://codex.wordpress.org/WordPress_Backups and http://codex.wordpress.org/Restoring_Your_Database_From_Backup.  There are several plugins you can install which will backup your blog on a schedule—it’s not a bad idea to use these.  I think the method below is pretty easy and effective for a migration, but isn’t necessarily a process you want to repeat every week as part of a regular backup (unless you script it, which is possible).

Step 0: Get The Tools

I used two tools to migrate my blogs—FileZilla, to transfer the files, and MySQL Workbench to migrate the databases.  Both are free and widely available.

Step 1: Prepare Your New Host

Before you do anything, make sure your new hosting is set up, that you can log into your control panel, and you have both a new website and database set up.  On some hosts (such as AppliedI), the FTP login is the root folder, but the WWW service points to s subfoler—make sure you know where to put the files.  Keep track of your passwords!

Step 2: Clean Up Any Messes

Migration will involve exporting data from your current blog’s database, then importing all of it again into your new blog’s database.  This process, on both ends, can take some time, so obviously the less data you try and move the easier it will become.  This is the time to log in to your control panel, empty all the spammy and trashed comments, clear out posts which haven’t been published if you don’t plan on finishing them, etc.  Also, if you have any custom DNS entries made on your current host’s nameservers, such as redirecting email to GMail or Hotmail, copy those settings.

Step 3: Download The Blog Files

Log in to your current blog, and download all the files.  You’ll need everything in your blog root, as well as the three subfolders (wp-admin, wp-content and wp-includes).  Download these to your local machine, because you’ll need to edit one of them.  Don’t delete anything from your current site, just in case you need something again.

Step 4: Export Your Blog’s Data

This step requires the most explanation.  It’s not difficult, there are just a number of small things which need to be done.

Start up MySQL Workbench; the Workspace area is divided into three columns, the far right of which is Server Administration.  Below this listbox, click New Server Instance.

image

Choose the Remote Host option, and enter the name of your current blog’s MySQL Server, then click Next.

image

Give this connection a better name in the Connection Name box; this will populate a connection in the SQL Development column.  Change the Username if necessary (it probably is).  If you want/can store the password in MySQL Workbench, click the Store in Vault button next to Password, and enter the password in the dialog.  If you don’t store the password, you’ll be prompted when you try to connect.  If you need to, adjust other settings, but you probably won’t need to.  Click Next.

image

The database connection settings will be tested.  If Workbench cannot connect, you’ll need to fix whatever is wrong before you can continue.  Click Next once everything is OK.

image

Remote management takes some additional configuration, and it’s not something we’re going to do here.  If you want to use MqSQL Workbench to manage your database, you can set this up, but it’s not necessary to export/import data.

image

A bunch of intermediate steps will be skipped, and we then assign a useful name to the new Instance.  Clicking Finish here will close the wizard and create the connection and the instance.

image

Select the new instance with a single click, then choose to Manage Import/Export.

image

You may be prompted to choose the connection.

image

This is the most important set of our export.  Select your database with a single click, then choose which items correspond to your blog.  In a WordPress database, there are only tables, and by default they are prefaced with “wp_”.  The image below shows a default install, for reference.  To make the import easier, choose to Export to a Self-Contained file.  For most blogs, this will be OK, but for very large blogs, you can choose to export individual tables into separate files.

image

The export will take a few minutes—watch the progress indicator.  When complete, you can close the Import/Export window.  We need to make a couple small edits to the export file before we can use it.  If you exported to multiple files, you’ll need to make this change to all of them.

About 22 lines down is the command to create a database if it doesn’t exist.  Since our user probably doesn’t have the correct permissions to do this, we need to commend this out by adding two dashes and a space at the beginning of the line (the space is necessary).  A couple lines further down is the USE directive.  This needs to be changed to the name of our new blog database.

image

image

Step 5: Import Your Blog’s Data

If you haven’t done so already, make sure your new blog database is set up, and has a login user ID created.

Back in MySQL Workbench, under the SQL Development column, click the New Connection link.

image

Just as before, give this connection a useful name, then update the Hostname and Username (if necessary).  Again, if you want/can store your password in the vault, do so.  Once everything is correct, click OK.

image

When all is well, we’ll have a new entry in the Connections listbox.  Double-click the new blog entry to open the SQL Editor.

image

In the SQL Editor, open the dump file you created above, double-check you made the minor (but important) edit above, and run the script.  The tables should be created and populated.  If you dumped to multiple files, you’ll need to repeat this process for every file.  When all the scripts have been run, you can expand Schemas >> [your database] >> Tables and see the WordPress tables.  If you’re familiar with SQL, you can query some data at this point, too.

image

Step 6: Upload Blog Files (edit the config first!)

Before we do anything, we need to modify the database connections in our downloaded wp-config.php to point to our new host’s database and server.  These are the first four settings in the file.

image

Save this file, and upload all the files to the new host.  Make sure you’re in the right folder, whether it’s the root or a subfolder.  Once this is complete, you should be able to view your blog through a temporary URL, or your actual URL, depending on how your site is configured at this time.

Step 7: Update Nameservers

Since you’ve moved to a new host, it’s now time to update the nameservers for your domain.  This is now a good time to download any email you want to keep from your host’s email system.  You’ll probably need to update your email clients, too.

Congrats!  You should soon have your blog completely set up on your new hosting service.  Remember to cancel your old service!

Having multiple domains point to the same WordPress blog

We’re making some business changes to The Bloomery, and combining two different sites into a single WordPress blog.  The outcome we want is multiple domains all pointing to the main blog.  And we want to run it on Windows/IIS.  Out of the box, WordPress is designed for a single blog with a single domain, but there are a number of settings and plugins that we used to end up with what we wanted.

With WordPress 3.0, there is a new Multisite Network option, where multiple blogs can be created in the context of a single installation, and different domains can map to each of the child blogs.  There is the option of using subdomains (blog1.mysite.com, blog2.mysite.com) or subdirectories (mysite.com/blog1/, mysite.com/blog2/).  When you set up Multisite, you have to choose one or the other, and you can’t change once you’ve made your choice.  In either case, you have to make some edits to the .htaccess file for URL redirects/rewrites.  On IIS 7, there is no .htaccess file, but we can accomplish the same thing with the web.config and the URL Rewrite Module.

Make sure all your domains point to the correct hosting account, and install WordPress.  After installing WordPress, here’s what needs to be done:

1. Set up a Multisite Network using subdirectories; follow the steps at http://www.lauragentry.com/wordpress/?p=517.

2. Install the WordPress MU Domain Mapping plugin, from http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/.  You need to do a manual installation, but it’s easy.  For some additional information on this plugin, see http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/.

3. The main site is assigned a site ID of 1.  From the main site’s control panel, under the Super Admin, you want to add all your domains with a site ID of 1.  They won’t show up in the mapping, so just try and visit each of your domains to see if they all point to the main site.

Yahoo closing Delicious? What next?

First of all, the fact that Yahoo is closing the social bookmarking site Delicious cements Yahoo’s reputation as having the uncanny ability to become completely irrelevant.  Let’s take a walk down memory lane.

Yahoo started as a human-edited directory of links to websites.  Back in the mid-90s, that was easy to keep up with.  There weren’t that many sites.  What started out as a free listing, then became paid-for-faster-inclusion, and finally became pay-for-inclusion.

Just as the proliferation of sites was making human editable directories cumbersome to both edit as well as use, search engines began to be developed.  First up was AltaVista, from DEC (Digital Equipment Corporation).  AltaVista was basically word matching to show how fast DEC’s new AltaVista chips were.  Everyone was impressed, but not as much with the chips as with the service.  DEC didn’t stray from its core purpose, and now AltaVista is part of Yahoo (also on the chopping block) and DEC was consumed by Compaq, which was then consumed by HP.  The same year Compaq bought DEC, a research project known as Google was launched.  To supplement its directory results (which you can still find at http://dir.yahoo.com/), Yahoo began serving search results from AltaVista, and later, Google.

The short history of the Internet is littered with stories of companies that “get it”, and companies that don’t/didn’t.  Yahoo has shown, time and again, it doesn’t “get it”.  Despite having a stable of awesome web properties (like Delicious and Flickr), Yahoo just can’t figure out what to do.  That’s kind of pathetic, really.  Think of it this way–Delicious was a human edited directory of websites.  Instead of single entries, a site could be submitted as many times by many people.  What more zeitgeist do you need?  These data are a gold mine of trend analysis.  No one wants Yahoo to reveal the specific user information, but few people would care if Yahoo said (or sold) the aggregate facts—1000 people linked to Site A in the 12 hours after a story about it was posted; over time, 350 people have visited the site more than once, and 50 repeatedly visit the site.  Like Pecos Bill used to day, there’s gold in them thar hills!

Well, too bad for us Delicious users.  So what’s next?  This falls in line with my belief that you, and you alone, need to be in control of your data.  I broke this rule with Delicious, and now I’m paying the price.  The export functionality does not produce well formed or valid XML, so the output will be difficult to work with.  In the end, I want to control my own data again, so I’m looking for a Delicious-style script or site to use.

One option is PressMark, an older WordPress-based bookmarking site you can host yourself (bonus if there is an Android client) or is a cheap fees.  Sabros and Scuttle are open-source pojects which claim to be similar to Delicious.  Akarru, GetBoo and Feed Me Links also make similar claims.  The website Diigo is sort of a combination of Delicious and Evernote.  I’m not sure which way I’m going yet, so drop me a line if you have experience in one of these products, or in such a similar situation.

[update]

Lifehacker has a couple more options listed at http://lifehacker.com/5714329/the-best-services-for-migrating-your-delicious-bookmarks.

Social Media Marketing

MarketingProfs has some good food for thought in their Q&A with Josh Hallett:



Q: We keep hearing about the growth of Facebook. For most companies, does it make more sense to use its blog, or social sites such as Facebook and Twitter, as tools to stay in touch with its customers?


A: If we look at many of the “tools” of social media and social networks, the foundation is conversation and relationships. The majority of users are on the services to interact with friends. But can a corporation be a friend? Does a corporation really have anything of value to offer a customer in terms of conversation or relationships?


This is where the human element comes in (has DOW trademarked that yet?). I’m not going to “friend” a company, but I will friend somebody who works for the company. However, is that person able to speak on behalf of the company?


Ooohhh, that’s good stuff.  I see a lot of companies–large and small–thinking they need to get into Twitter, Facebook, MySpace, etc.  Why?  People are loyal to brands, but don’t really relate to companies.  Now, the owner of a small business can build a cult of personality around themselves, but that makes separating oneself from the business especially tricky.


Read the full story at http://www.marketingprofs.com/7/social-media-qa-with-josh-hallett-collier.asp.

Podcamp Pittsburgh 2: August 18-19, 2007 at the Art Institute of Pittsburgh!

Friends Cindy Closkey and Mike Woychek are back in the saddle with another awesome
opportunity to learn about blogging, podcasting and marketing in the “new
media”.  Sadly, I’ll be on my way to Hilton Head Island this weekend. 
But don’t let that be an excuse not to attend–it will still be a great
event.

In case you haven’t heard, PodCamp Pittsburgh is coming back for a
SECOND great year!

WHAT: PodCamp Pittsburgh 2 (or PCPGH2)
WHEN: August
18-19, 2007@ 9 AM – 5 PM
WHERE:
The Art Institute of Pittsburgh (420 Boulevard
of the Allies, Pittsburgh PA 15219)
COST: FREE!

UPDATED! The session schedule is open! Please visit the website to
view the schedule or add your own if you want to conduct a session and share
your knowledge!

Meet social media creators — and fellow viewers / listeners /
readers!

Exchange tips, build contacts and launch new ideas!

Learn how to integrate (or improve) podcasting, blogging and social
networking into YOUR
business!

Questions? Sponsorships? Registration?

For more information, please visit our website:

http://podcamppittsburgh.com

You can also add us at Twitter: http://twitter.com/pcpgh

Looking forward to seeing everyone in
August!

Getting Started Blogging by Commenting

If you’re interested in getting started blogging, but don’t really understand what blogs are, or what the fuss is all about, maybe the best idea is to wade into the blogosphere, rather than dive in.  A recent article at Marketing Profs includes this advice, from ProBlogger’s Darren Rowse:

Listen first, and then join the conversation.

What he means here is start by reading blogs.  Then, leave some comments when you feel you have something to say.  Once you’re comfortable with expressing your opinion, start your own blog.  And that’s where the rest of Marketing Prof’s tips come into play.

Full story at Blogging Baby Steps: How to Join the Conversation Without Starting Your Own

Researchers Track Down a Plague of Fake Web Pages

Splogs suck.  We all know that.  And we all know where they are, and why they’re there.  And we know Google has been slow to do anything about the problem, since Adwords are a gravy train for them.  Recently, Microsoft researchers have gotten to the bottom of the scum, and may have a way to filter splogs from legit blogs:



The researchers’ specific findings included evidence that some blog-hosting services have permitted an explosion of phony doorway pages. For example, the researchers noted that such pages were far more prevalent in Google’s blogspot.com service than in other hosting domains. The Microsoft Research team has worked extensively with the managers of Microsoft’s Spaces blog-hosting service to detect and identify search-engine spam, Mr. Wang said. Google would not comment for the record on its own efforts to combat such practices.


Full article at http://www.nytimes.com/2007/03/19/technology/19spam.html?ex=1332043200&en=63a9e5286915f3bb&ei=5124&partner=permalink&exprod=permalink.


(Hat tip: Stephanie’s FlowerHaus)


Add to this the findings that blogger.com is riddled with malware, and it seems to be only a matter of time before corporate filters blog blogger.com (if they don’t already).

One More Way to Answer “What Is A Blog”?

About a year ago, I tried to give an alternate way to think about “what is a blog“. 
Since then, I’ve also become a big fan of Pajama Market.  Great minds think
alike; on the same day, Brian came out with his “what
is a blog
” post, I was trying to explain them in a private florist
forum.  Here is my attempt:

This single post isn’t a deifnitive answer, but a discussion
opener.

A blog is a web-based application. Some people confuse them
with a traditional website, and some use blogs instead of websites, but blogs
are actually different. If you think about a traditional website, the
navigation is very structured, and content is arranged usually hierarchically.
The design of a webpage can get very complex, and may contain a considerable
amount of content. It often takes a lot of work to create and maintain a
traditional website, sometimes involving special software tools and technical
knowledge. When a visitor returns to a traditional website, the new content is
not readily apparent.

On the other hand, blogs are designed to be very
simple. Content is shown in order of date added, with the most recent posts at
the top of the page. After a certain time period or number of posts, older
content rolls off the bottom. The blog application automatically creates the
navigation. Posts are arranged by date, and into categories (a.k.a. tags).
Clicking on a tag brings up all posts in that category, arranged from most
recent to oldest. There is typically only one or two levels of navigation in a
blog. The page layout of a blog is very simple.

Adding a new post is
easy. You simply log in, click the “new post” button, and use a rich text
editor, same as posting here. Very, very similar. No software necessary other
than your browser.

Different blog applications differ in their
capabilities. The software we use at FloristBlogs.com has some very advanced
features, but is easy to use.

On many traditional websites, there was often a
“what’s new” or “announcements” page, that was cumbersome to work with, and
just as difficult to update as the rest of the site. A blog is a far superior
way to replace a “what’s new” page.

One of the limitations of a website
is knowing who is linking to to you. Blog applications are designed to talk to
one another. When I post a link on my blog to someone else’s blog, my software
sends a message called a “trackback” to the other person’s blog. They know
immediately that I linked to them, and can follow the trackback to the post
which has the link. Trackbaks were originally shown along with post comments,
but trackbacks have become heavily abused by spammers, so the trackbacks are
now rarely displayed, if the functionality is even enabled at all.

The
obvious follow-up is whether to have a blog, or a website, or both. This
depends on your business, but in our case, I’d recommend both if possible.
They serve different purposes. A website should be considered an additional
shop, while a blog is a marketing channel.

I missed a few points in my definition, which Brian covers in his post at http://www.pajamamarket.com/pajama_market_small_busin/2007/01/what_is_a_blog.html
Worth a read.

Adding Lightbox to dasBlog

Lightbox is that cool photo-opening javascript/css combo.  You know, the one where the page is greyed out and the image is overlaid on the page.  If you haven’t seen it, go to http://www.huddletogether.com/projects/lightbox2/ for a demo.  While you’re there, download it.

Once you have the download, unzip it.  Upload the JS, CSS and IMAGES folders to your dasBlog root.  If you have an images folder there already, just add the images to that folder.

To add the scripts and CSS to your blog, you need to find the theme.  Figure out which theme you’re using, and drill down in the Themes folder, and open your theme’s folder.

Find the homeTemplate.blogtemplate file, and open it in Notepad.  In the <HEAD> section, add the four includes (three JS and one CSS) as specified on the Lightbox sit  You can cut and paste from the sample page in the ZIP if you’re lazy.

That’s it!  All you need to do is activate your links with ‘rel=”lightbox”’, and you’re good to go.