How I successfully moved my WordPress Multisite Network to HostGator from 1and1

Just in time for Christmas, I finished migrating brandonmoeller.com from 1and1’s webservers to Host Gator, a Houston-based web hosting company that was running a great deal on all of its hosting plans for Black Friday last month. (I’ve hinted before at some of my frustration with 1and1.)

I jumped on that, saving an estimated 60 percent of web hosting costs over the next two years.

It’s a move I’ve been meaning to make for a long time, as I’ve steadily grown more frustrated with 1and1’s occasional but not frequent downtime and the resources my shared web hosting plan provided. I’ve been with 1and1 since 2004, I believe, when I signed on to a bargain of a deal of the first year or two being free. That’s back when they were entering the web hosting market here in the states.

I don’t have a lot of bad things to say about 1and1, but I was eager to leave for a plan that uses cPanel (another Houston-based company) and that will allow me to more adequately scale my web resources as I need to.

Of course, after purchasing, I discovered that there are plenty of discussions out there about Host Gator’s performance, the reputation of its new owners who are buying out a lot of the key players in the market, and its emphasis on dirt-cheap shared web hosting and loud marketing efforts.

But a bargain is a bargain. I’ve come to love a good bargain.

And the exercise of moving enables me to keep my site in shape so I can move next time there’s a good bargain and I’m out there looking. We’ll see how this goes.

And honestly, folks — so far, so good. HostGator has been a reliable solution that hasn’t failed me or frustrated me yet. I’ll keep you posted. This post and this site is not for sale.

Migrating My WordPress Multisite Network to HostGator

While transitioning this site from 1and1 to HostGator, I found that exporting the MySQL database and importing it at the new host’s phpMyAdmin didn’t work for me. I did this with a manual install of WordPress’ core files and changing my .htaccess and wp-config files to reflect the newly imported database, and in the process, reading this page on WordPress.org over and over again a thousand times.

I even pored over HostGator’s support docs, including this page specific to WordPress MU.

So, I started over and used the WordPress’ admin panel’s export function and added the import plugin to a brand-new install of WordPress that was installed using Fantastico, a script one-click-or-so library that allows HostGator (and other web host users) to quickly install an optimized version of WordPress on their web host’s server. This worked much better, but as such, all of my photos are no longer in the Media Library.

No database, No Media Library

Which meant that any posts that contained a photo gallery created by the media library had to be rebuilt from my computer’s hard drive archive, as the media library no longer recognizes all the photos and the unique IDs they were given when originally installed in the previous database. Lucky for me, I only had to do this three times, as I don’t typically use WordPress’ built in photo gallery feature, instead, opting to use Picasa Web Albums (Google+ Photos) instead. I have a lot of photos. Way back when, I wanted to pick a photo solution that was future-proof, though — heh — I doubt one exists.

They are still all on my site because I was careful to ensure the paths to them didn’t change as I uploaded all of my images and other wp-content goodies via FTP.

In retrospect, I think this was a good decision because it allowed me to start my database, essentially, anew as well as WordPress’ core files as well.

WordPress is great because its team of expert developers at Automattic pride themselves on backward compatibility. However, after time, a WordPress blog that has been around forever seems to be weighed down by past artifacts that are no longer needed, or at least that’s my inclination.

New multisite upload file structure

Another stumbling block I came across was content found on my network subsite.

For my Hire Me site, which is its own WordPress “site” as part of my multisite installation, the way assets are filed in the directory structure changed with one of the more recent versions of WordPress. Since my old multisite network on my old server was installed before this change, WordPress’ backward compatibility features kept everything in the old file structure — and it just worked.

But migrating to a new installation that didn’t know that, my images on my portfolio page were no longer working when I created a new site in my new multisite network, and imported it in.

Using wordpress.org as a resource, I was quickly* able to discover what happened (a change in the Uploaded File Path), change the structure of my images, and then go in and alter every IMG tag to reflect the new file structure, then it worked.

But I was really glad I didn’t have to do this on thousands of pages on multitudes of sites within the network. Then, I’d likely have to use a database search and replace tool like Database Search and Replace Script in PHP from interconnect/it. I did use this tool on my 1and1 server to change the domain name and site URL to another one so I could compare the old version with the new, once my domain name had propagated.

* Once I discovered the problem wasn’t about my DNS settings of my domain propagating to Hostgator’s nameservers, an incredibly slow process thanks to 1and1 and their inability to offer tools like setting TLD to speed it up, alas – another story. 

Conclusion

Moving is never easy. It requires attention to detail, and backups, backups, backups. Make sure you back up your database via phpMyAdmin first, then export your WordPress blog’s XML file via Tools -> Export second, then make a back up of every thing in your wp-content folder before you even begin shopping for a new web host.

Then, when you finally make a decision and purchase a new space, then make another back up.

You can’t have too many backups.

Once you have a new web hosting provider, and you’ve changed the nameservers of your domain name and added your domain name as an add-on domain [This is how cPanel does it; make sure when you’re finished you fix its need to create subdomains off your main domain by redirecting the subdomains (for example: brandonmoeller.mymaindomain.com) to the proper domain, but this is another issue], then and only then try importing your MySQL database. Maybe it will work for you. It should — I really can’t explain why it didn’t work for me, especially considering I was keeping the same domain name and everything.

But since it didn’t work, I think it allows me to keep my database more slim and trim because my previous entries in the Media Library no longer exist.

One of the immediate benefits I’ve found with my new web hosting home at HostGator is that I can now upload larger images into my media gallery, previously, I was capped at a very laughable 1 MB (though, it did force me to watch my page weight).

What’s next for BrandonMoeller.com?

As we approach a new year on a new host, I think now is as good a place as any to detail some plans for this site in the coming year.

  • New Twenty Fourteen child theme for the new default theme that ships with WordPress — And this time, I hope to share it with the community by uploading it to wordpress.org’s theme repository. Get a sneak peek at it as I develop it.
  • More long form articles like this one aimed at sharing what I have learned about WordPress and web development in general during my time hacking away at sites for fun and profit since 1997.
  • More links to other articles that have helped me learn.
  • More, more, more (Don’t want to commit to all the crazy ideas I have right now.)

Waiting

Less than 24 hours after updating all the WordPress sites I manage on Monday to the latest version 3.7 which came out on Friday — it looks like the new 3.7.1 is available.

Can’t wait to see how the new automatic update feature works on this site.

Here’s a good read about the choice to keep automatic updates simple in the admin, via the Tavern.

Also, I’m waiting for my custom vanity URL for my Google+ profile.

 

New color palette, new Genericons and goodbye chat post formats

As I’m continuing to alter the default WordPress Twenty Thirteen theme via my own child theme on this site, most of my concern up to this point has been focused on post formats.

Though I like Twenty Thirteen’s bold colors and diversity of styles and formatting for every post format, I knew I wouldn’t be happy until I made it my own.

Colors

I have taken the original child theme I was using called Twenty Thirteen Blue  and changed all of the colors — here is what I have most recently settled on, for now:

spine-lower-swatch50-more

It’s such a large color palette because I wanted a distinct color for just about every post format.

Genericons

I’ve also added to the child theme’s CSS styles to ensure that every post format has its own Genericon, as selected from Automattic’s flexible icon font for blogs, which comes bundled with the Twenty Thirteen theme.

Here are the Genericons I am now using on this website:

genericons
Standard, aside, image, gallery, video, status, quote, link, art (chat), audio

Look for these Genericons on each post on the blog index pages and on the posts themselves. Find them near the article posted date.

To get each post format to display a different Genericon, I had to include variations of this CSS code in the stylesheet:

.format-chat .entry-meta .date a:before {
 content: 'f408';
 margin-right: 2px;
}

Not that chatty

I love WordPress post formats, as you can tell. It’s a great feature, and I can’t wait to continue to alter the template for each of these ten distinct taxonomies.

But I have no real use for the post format: Chat. I just don’t have any interest in sharing chats that I have with others on this blog, and if I did, I could still decide to select the Standard, Aside, Quote or Status post formats.

In its place, I wanted a different post format for Art. These types of posts will mainly contain images that are artistic, or — heh — at least not of the family or other usual subjects. Most, if not all, of the posts in this post format will be categorized as Art, though some posts in the art category may have different post formats like Aside, Image or Status.

To make this happen, I had to copy over one of Twenty Thirteen’s key functions concerning post formats and alter it in my child theme. Here’s the important part of what I came up with as I modified the twentythirteen_entry_date function:

if ( ! function_exists( 'twentythirteen_entry_date' ) ) :

function twentythirteen_entry_date( $echo = true ) {
if ( has_post_format( array( 'status', 'aside', 'audio', 'gallery', 'image', 'link', 'quote', 'video', ) ) )
$format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' );
else if ( has_post_format('chat') )
$format_prefix = 'Art on %2$s';
else
$format_prefix = '%2$s';

...

endif;

Where we are now

today-screenshot

Thoughts?

Editing core WordPress files to Quick Edit post formats again

This article will explain how I edited some files in WordPress to allow for the ability to change post formats while using the Quick Edit feature.

This technique will allow admins and editors to quickly change a post’s format without having to click through to the edit post page, saving a lot of time and frustration for those interested in going back through their archives and assigning post formats to hundreds of previous posts, like I did.

Since this technique requires editing core WordPress files that are part of the open source software one must install on their server, it is likely that this technique will need to be repeated when the next updated version of WordPress is released.

What we want:

post-format-quick-edit
Highlighted is the post format edit dropdown menu in the Quick Post options on the “All Posts” screen. This change now allows me to edit post formats of posts without visiting the post edit page for each post.

Why we want it:

The frustrating aspect of all of this is that this previously was the functionality of the Quick Edit feature – but it was removed in WordPress 3.6 as a result of this ticket.

At the bottom of the ticket, one lone voice of dissent can still be heard.

I think this was a mistake.
Better to improve and to add something than just remove…
In the Quick Edit box we could add some inputs appearing and disappearing like the edit post page…

—Alexandru Vornicescu (alexvorn2)

But Alexandru not only said something. He also did something: he opened a WordPress ticket of his own. And then, the WordPress open source community started hacking away at a solution, to be included in an upcoming release. But I couldn’t wait.

So I examined what the previous version included that allowed for the functionality and added it back into these files:

wp-admin/includes/class-wp-posts-list-table.php
wp-admin/includes/post.php

It worked like a charm and I am now able to revise WordPress post formats from the quick edit options again.

Update: Oct. 12, 2013

It looks like Helen Hou-Sandi has come to the rescue, and though she doesn’t agree this functionality should be added back into the Quick Post options, she said she “would be okay with restoring in bulk-edit,” which now that I think about it, makes a lot more sense and I can’t wait until the next version of WordPress is released so I can ditch my changes and continue using an unaltered core of WordPress.

Three weeks ago, Helen fixed it and closed the ticket, and to date is among 404 closed tickets for the upcoming WordPress 3.7 milestone.

Of course, if you disagree and want to find a way to add post formats back to the Quick Edit post, follow the links above and edit your WordPress core files. At your own risk.

Twenty Thirteen test drive

A screenshot taken today of my blog after activating the Twenty Thirteen default theme for WordPress 3.6.
A screenshot taken today of my blog after activating the Twenty Thirteen default theme for WordPress 3.6. This photo is set to “alignment left.”

I’ve activated the new Twenty Thirteen theme that was released with the WordPress 3.6 launch back on Aug. 1.

Things look a little different here, and for the most part I like it.

I will be modifying it by creating a child theme very soon, but for now, I thought it would be nice to use the stock Twenty Thirteen theme and kick the tires a bit. Today, WordPress released 3.6.1, which I promptly upgraded to, and they are scheduled to release WordPress 3.7 in October (we’ll see – 3.6 was four months late by my watch).

First observation of interest: Photos when they are aligned left. They jut out into the margin. I’m not convinced, at first glance, that I like this. The photo displayed above is an example of this.

When not aligned left, here’s what a photo does:

Here is a screenshot of the homepage in the previous theme, Twenty Twelve. This photo is set to "alignment none."
Here is a screenshot of the homepage in the previous theme, Twenty Twelve. This photo is set to “alignment none.”

I added a thin black border to each of the screen shots above to better demonstrate the alignment style.

The really interesting thing about this new theme that I can’t wait to test out and modify via a child theme is its different styles for the ten post formats that are now a prominent part of WordPress 3.6.

These ten post formats are:

I have changed a few of my recent posts’ post formats to these types to see what happens.

Update: The Next Day

Heh. Back in April, I commented on the Twenty Thirteen designer Joen Asmussen’s blog post about the theme. It should be noted that Mr. Asmussen, like me, was also born in November of 1979.  I forgot about making that comment on his blog until doing some research on the theme, thinking about how I want to make a child theme of it.

Then I saw his blue child theme for Twenty Thirteen, downloaded it, and activated it. You know, to see what happens.

My blog, in the Twenty Thirteen Blue theme, by Joen Asmussen
My blog, in the Twenty Thirteen Blue theme, by Joen Asmussen

Getting WordPress for Android to work with 1and1

I’ve been stumped the last few days, trying to figure out why I was unable to update my self-hosted WordPress blog hosted on a medium-tier shared hosting space at 1and1 … it was just not working with the Android app.

It used to work. Back when I had a smartphone, I used the Android app a few times to post to WordPress … but it’s been awhile since I wanted to do it and now that I have the new Nexus 7.2 tablet, I thought I’d give the always-improving Android WordPress app another shot. But I’ve read that with WordPress 3.5, there was a change in the xml-rpc mechanism that WordPress uses (for instance, admins can no longer toggle it on or off from the control panel) and now that WordPress version 3.6 is out, who knows – but, the point is, it no longer worked for me.

After trying everything else it seemed — messing with the .htaccess and php.ini files, re-installing WordPress, reinstalling the Android app, etc etc — finally, I tried something that worked.

I renamed my xmlrpc.php file and uploaded this plugin, modified it, then activated it.

Rename XMLRPC (Jorge, daniloercoli and Automattic) y’all are my hero. According to the official WordPress Android app’s help page, excerpted below, this is likely my host’s fault.

My Host Blocks XML-RPC Access! How do I fix that?

Needing someone or something to blame when things go wrong, I’m blaming you, 1and1 – and it’s just about the final straw and I know I’ve said that before. But this, on top of another problem I’ve been experiencing on this WordPress installation that prevents me from uploading an image bigger than 1MB (yes, I know! What year is it?) makes me wonder if maybe it’s just not time to start over, somewhere else.

Pack up the database, migrate it all over and move the domain registrar and everything. I’ve been with 1and1 for almost ten years now, but maybe it’s time to move on up and leave the Wal-Mart of webhosts.

I remember the last time I had to rebuild my WordPress database, when I created this MultiSite version. I’m pretty sure it took all weekend, but that was years ago and I didn’t know then what I know now. Knowing more now means it will likely take twice as long.

Anyway, I wanted to put this out there in case anyone else with 1and1 is suddenly finding they have trouble publishing to their blog via the great apps that now exist to make the WordPress platform better than ever.

Post Twenty Twelve

I’ve been hacking on the new Twenty Twelve default theme for WordPress since before it was released.

The great thing about WordPress is that as soon as the open source community begins working together to tackle a problem – they begin releasing the code publicly for beta review and to allow people to begin testing or forking it. I started looking at it in June because I was intriqued by its new simplistic approach to a responsive menu.

On Sept. 27, 2012 – the new Twenty Twelve theme was officially released. As soon as it was, I knew I would want to base my BrandonMoeller.com redesign on it, as I previously did with the Twenty Eleven theme.

Here’s some screenshots of my website with the Twenty Twelve child theme I designed:

ikea-post
The standard post page
The photos page.
The photos page.
The contact page.
The contact page.

Here are some details about the new Twenty Twelve child theme.

Fonts

I’m still using the Franklin Gothic FS family of fonts that I bought from FontSpring.com two and a half years ago.

Franklin Gothic FS Medium Condensed continues to be the web font for the Site Title “Brandon Moeller” up top in the header, while I’ve chosen the Google Web Font Oswald. Right now, I’m using it for my post titles.

Here’s an article that explains the method I used to alter my functions.php file in the child theme to add Google Fonts to my website.

The new Hire page

I completely re-thought the Hire Me section of the website.

I renamed the page “Portfolio.”

I moved it to its own WordPress site within my Multi-Site installation.

It stayed at the same URL: https://brandonmoeller.com/hire/

It mirrors the look of BrandonMoeller.com except it has a unique menu and the title of the WordPress website is “Brandon” (not “Brandon Moeller”). It shares the same theme — but with one difference.

In the BrandonMoeller.com website, I have to edit the CSS via JetPack (thanks, version 1.7 ) to hide the .site-title-secondary class I created to display “Moeller” on the Hire site. (( .site-title-secondary { display: none; } ))

The Hire site’s portfolio page is a new design that incorporated the Toggle function of the Jquery library as well as shortcodes and styles I added to the child theme and the visual editor via
TinyMCE.

All that being said …

I won’t go into what I did to customize my child theme to personalize Twenty Twelve in this post. Honestly, I never found the time to finish and I’m looking forward to WordPress 3.6 and the new Twenty Thirteen theme which is expected to improve the post format UI.

Even though I am releasing this child theme to download; I’m not completely satisfied. It does look nice the way it is now and I won’t be making any more changes to it.

I think I’m looking forward to the new version of WordPress, expected in April, which will contain the new Twenty Thirteen theme.

Life is keeping me pretty busy right now. Which is a very good thing.