Categories
Personal

Moving to WordPress 3.0

Since I’ve already taken the plunge and moved over to WordPress 3.0 and consolidated my various separate WordPress 2.X installs to it, I thought it would be good to document the process I used to try and help others who might be wary of taking the plunge. There are unlimited ways that you may have your particular install set up, so this may or may not apply. Do not fold, spindle, or mutilate.

It may be obvious, but before you do ANYTHING with your WP install, back up your files and your database. Backing up your files is as easy as downloading your install directory locally via FTP, and if you aren’t familiar with how to back up your database (YOU SHOULD BE BACKING UP YOUR DATABASE REGULARLY) there are good instructions here. Go back up your site, and come back when you’re done.

Everything safe? Ok, now…you want to go to your WordPress dashboard, hit Tools, and Export. What you’ll get is an XML file of all the content from your blog: posts, categories, tags, authors, etc. Save this in a very, very safe place. This is the file that you will use to import your blog into your new WP 3.0 site. Repeat this step for every blog you hope to move, renaming the Export file into something recognizable.

In my particular instance, I had a site set up that went like this: at the root level of my website, I had just a flat HTML file that was my homepage. I had two different WordPress 2.X installs in subdirectories (/wp and /eliza). What I wanted to do was to install WP3.0 in my root directory, and then use the Multisite functionality built in to WP3.0 to re-create the /wp and /eliza blogs, running in the single root-level install.

After backing everything up, I went ahead and installed WP3.0 in the root directory. There is then one bit of manual code you have to add in order to enable multisite capabilities. In your wp-config.php file, just before the line

/* That's all, stop editing! Happy blogging. */

You need to add the line

define('WP_ALLOW_MULTISITE', true);

This enables multisite capabilities. You’ll have to do a little bit of copy/paste into your .htaccess file, but WP walks you through it. When you log into your install again, you’ll see a new set of controls in your dashboard relating to these new capabilities.

One more bit of editing is needed before you move on to creating new blogs and importing your XML files into them…by default, WordPress filters imported XML by removing possible troublesome tags…unfortunateely, including things like <embed> and <iframe> and other instances where you’ve included content in your posts. WordPress does so via a file you can find in /wp-includes called kses.php. In kses.php, you’ll want to scroll down to line 1309 and comment out the three lines under //Post filtering so that they look like this:

// Post filtering
#add_filter('content_save_pre', 'wp_filter_post_kses');
#add_filter('excerpt_save_pre', 'wp_filter_post_kses');
#add_filter('content_filtered_save_pre', 'wp_filter_post_kses');

This will prevent the filter from removing all your youtube videos, slideshare embed, scribd documents, etc. Once you’ve altered the filter and saved it, you’re ready to create your new blogs, hit the Tools menu, and import your XML from your exports above. After the process completes, you should have a working blog with all of your previous content in place exactly as before.

For my particular case, it was important for me to maintain the existing directory paths for /wp and /eliza so as to not break tons of incoming links…WP3.0 handles that perfectly. After all this, I now have WordPress running at the root level of jasongriffey.net, Pattern Recognition and Brand New World working exactly as they were with the separate installs (including permalinks!), and will be moving my previously flat-file homepage into WordPress pages. I’ve got my whole site running on WordPress, and the ability to create new blogs at will in order to expand my setup.

I’m chuffed about the setup, and really, really excited about the possibilities with WordPress 3.0.

By griffey

Jason Griffey is the Director of Strategic Initiatives at NISO, where he works to identify new areas of the information ecosystem where standards expertise is useful and needed. Prior to joining NISO in 2019, Jason ran his own technology consulting company for libraries, has been both an Affiliate at metaLAB and a Fellow and Affiliate at the Berkman Klein Center for Internet & Society at Harvard University, and was an academic librarian in roles ranging from reference and instruction to Head of IT at the University of TN at Chattanooga.

Jason has written extensively on technology and libraries, including multiple books and a series of full-periodical issues on technology topics, most recently AI & Machine Learning in Libraries and Library Spaces and Smart Buildings: Technology, Metrics, and Iterative Design from 2018. His newest book, co-authored with Jeffery Pomerantz, will be published by MIT Press in 2024.

He has spoken internationally on topics such as artificial intelligence & machine learning, the future of technology and libraries, decentralization and the Blockchain, privacy, copyright, and intellectual property. A full list of his publications and presentations can be found on his CV.
He is one of eight winners of the Knight Foundation News Challenge for Libraries for the Measure the Future project (http://measurethefuture.net), an open hardware project designed to provide actionable use metrics for library spaces. He is also the creator and director of The LibraryBox Project (http://librarybox.us), an open source portable digital file distribution system.

Jason can be stalked obsessively online, and spends his free time with his daughter Eliza, reading, obsessing over gadgets, and preparing for the inevitable zombie uprising.

3 replies on “Moving to WordPress 3.0”

Leave a Reply to Andrea_R Cancel reply

Your email address will not be published. Required fields are marked *