Tag Archives: Plugins

Importing a wordpress.com blog into an existing blog

I’ve merged my geek blog back into my main blog, so watch your step. wordpress.com readers may want to bookmark my feedburner feed, as i don’t think i’ll be triple-cross-posting for long.

Sometime last year i started maintaining a separate geek blog, where i was posting all the geeky sort of stuff about wordpress. What started as a list of hacks turned into something resembling a real blog, mainly because people were paying attention to the geeky stuff. When i started, i wanted to focus on writing more architecture/design related posts here. As it turned out, it was easier to bang out 5 minute posts on a new hack, or a new gripe with wordpress. Since i’ve barely had time to even post in one blog, this blog’s been a bit of a graveyard. To the point that i even started posting semi-design related things in the geek blog. So i’m giving up on the split.

However, i don’t want to lose all the lovely traffic that wordpress.com has brought me in the last year. Naturally, it’s not trivial to merge two blogs without breaking any links. but it’s the steps aren’t too bad one at a time:

  1. buy domain mapping on wordpress.com. once it’s been running for about a week, you can safely start the rest of the steps. the wp.com servers will start redirecting people from username.wordpress.com to username.yourdomain.com.
  2. export your entries. make sure to delete spam before you do. this shrank the size of my *.WXR file to a fifth of what it was.
  3. set up a subdomain with your host. most hosts do this fairly easily. bluehost definately made it a breeze. the process is going to be different for every host, though.
  4. install wordpress in said subdomain, immediately. until you’ve got wordpress set up, people are going to see an empty directory listing for every entry.
  5. import all your old entries into the subdomain blog.
  6. change your permalink structure to “date and name based” to match wp.com permalinks.
  7. install the Permalink Redirect plugin.
  8. in the “Old Permalink Structure” field, paste in /%year%/%monthnum%/%day%/%postname%/, and check the “redirect hostname” box.
  9. somewhere around here you should double check that any links to your wp.com blog are landing on your new subdomain blog.
  10. import the same entries into the destination blog.
  11. change the permalink structure of the subdomain blog to match the destination blog.
  12. check that all the entries have similar url’s. if you have posts in multiple categories, wordpress my change up the order on you. since my geek blog was pretty focused, i trimmed everything down to one category (with a whole lot of tags).
  13. Last step: double check everything before you do this (expecially the checkbox on step 8): on the subdomain blog, in general options, change your Blog Address (URL) to the address of your destination blog.

That will make the permalink redirect plugin start sending everyone to your destination blog’s URL, with the matching permalink structure. The plugin only works for posts that exist, though. it can’t just make up category names (or whatever else is in your permalink structure). As long as you don’t change the WordPress Adress option, you should still be able to access the backend of your subdomain blog (should you want to make placeholder posts).

Anyway, i don’t know how much use this is to anyone else, since most people have the good sense to not try to write two blogs at once, but there it is.

for the obsessive theme switchers

I’m prepetually unsatisfied by themes. it’s not the theme authors’ fault, i’m just restless. alex king pointed to more advice: From Install to Pimped Out that sounds like the advice i found when i started using wordpress. but for anyone who does, or might, change themes, it’s wrong.

when you’re talking about meta tags, or feedburner RSS feeds, or custom title tags, you’re talking about things you don’t want to break when you change themes. and there’s no reason for them to. this is how i do it: i wrote a plugin.

Gasp! Shock! horror!
not really. if you can handle everything in the post above, you can handle this plugin. here’s how it starts:

<?php
/*
Plugin Name: archGFX Functions
Plugin URI: http://archgfx.net/
Description: all the things that i hack into themes, now they have their own file
Version: 1.0
Author: SunBurntKamel
Author URI: http://archgfx.net/
*/

you need to have a name, the rest of it’s optional.

so, all that fun stuff that you want to add to the head of your blog? dump it into a function:

function archGFX_head() { ?>
<META NAME="Description" CONTENT="archGFX is the brand name used by Adam Freetly. This portfolio represents personal and collaborative work." />
<meta name="keywords" content="adam freetly, architecture, blog, portfolio, design, rendering" />
<META NAME="geo.position" CONTENT="41.92;-87.70" />
<META name="geo.region" content="US-IL" />
<META name="geo.placename" content="chicago" />
<link rel="shortcut icon" href="http://www.archgfx.net/images/blogrdfbg.jpg" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://feeds.feedburner.com/archGFX" />
<link rel="search" href="http://archgfx.net/opensearchdescription.xml" type="application/opensearchdescription+xml" title="archGFX" />
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-91088-3";
urchinTracker();
</script>
<?php }

obviously i have a few more things than average. google analytics scripts, geo tags, favicon, etc. you can call the function whatever you want, just remember it. now that we’ve got all our code, we need to insert it:

add_action('wp_head', 'archGFX_head');
?>

that’s it, save the file, activate your ‘plugin’, and you’re good to go. naturally, i do a few more things with this. i also handle my footer copyright notice the same way, with

add_action('wp_footer', 'archGFX_foot');

i add the mybloglog widget to my dashboard with
add_action('activity_box_end', 'archGFX_MBL');

and, i don’t have to worry about forgetting to add any of it next time i switch themes.  the only thing that i don’t put in the plugin is my title tags.  you can only have one of those.  so while i could add mine with a plugin, i’d have to delete the theme’s title manually.

Linkslist

linkslist screenshot

The Links List is now preserved for posterity in the new plugin directory. It’s a lot simpler than i imagined, although it seems that the old plugin site doesn’t see it as a new plugin (not that i wanted it to), so i imagine that frontend is going to be deprecated pretty quickly (or maybe that’s just wishful thinking).

I’m still hoping this doesn’t mean there will be a similar new directory for themes, since

  • the licensing needs are substantially different
  • the potential for abuse is higher (people uploading themes they don’t have the rights to)

It wouldn’t be without benefit, but i don’t see it having the same feeling that the plugin directory does. And, as I’ve said before, themes will find their own repositories and homepages, regardless of the presence of an official repository. whether it’s designers being fussy, or the nature of skins and themes being somewhat “other” is up for debate, but it’s unlikely that wordpress will ever find that one home for wordpress themes.

Jizzy Handled

after reasonable testing, i’ve now upgraded my main blog. despite all the cool kids in the hackers list saying they never use the rich text editor, i use it all the time. yeah, sure, i can write code, but that doesn’t mean it’s appropriate to write about my weekend in code. so, here’s the list of changes for the upgrade:

Hacks

Plugins

  • i deleted all the plugins i’m not using. during the whole disable/re-enable process, i tend to forget which ones i’ve decided are crap. i blame this on installer, which makes it far too easy to install widgets for 3 days, decide they’re worthless, and then move on. it took a while, but it saves time, or something.
  • updated alex king’s plugins, which now all have their own hooks, so i had to hack them back out of my theme.
  • updated S2C. it was always such a pain, guessing what email people had used to subscribe. i like easy stalking.
  • deleted linkslist. hence the sudden existence of ul’s. i’m not going to take down the plugin, since people seem to find it useful(for the same reasons i built it), and the 2.0.x branch isn’t going away. i’m also not going to update it, because wp_list_bookmarks() does a decent enough job.

turning off akismet

my attempts at delurking aren’t going very well.  nonetheless, raven’s anti-spam has brought spam to a dead stop.  after commenting myself (man i’m uncool), i found this:  akismet was blocking the good comments.  not that they were hard to find in the list, since there were no spam comments.

there’s a simple choice. akismet is disabled.  akismet is great if you’re willing to accept some false positives.  i’m not.

Tiger Admin

Tan Tan Reports Steve Smith‘s Tiger Style Administration update is totally worth the hype. It actually whips my reports page into shape. (previously scaling the browser caused mass chaos). The main thing is, it doesn’t look like OS X. it’s not that i hate apple. it’s that i can’t stand the apple fan boys who think that you have to use a mac to design, because windows is too ugly. but now tiger admin looks like a web app, not a piece of an operating system that i’m not using. And it has the advantage over shuttle of, you know, actually being finished. although the themes page still only works well for a few themes, not so much for the 50-some-odd we have installed on wordpress.com.

EDIT:

i forgot to mention that my favorite thing about the plugin is the lack of
Really Big Bold Serif Fonts

Telling Jesus to go to hell

alright, Mullenweig, you win. It’s finally worth the effort for me to take Owen’s advice and installed X-Dashboard. You would have thought that it had been asked for enough times. You would have thought that the recent wp-hackers waffling over the inclusion of widgets would have brought it to mind:

WordPress Planet is not core functionality. It’s frilly, extra, bloat.

If you’re trying to simplify the wordpress admin area, start here. I’ve left the admin panel alone because it’s never been worth the effort to hack a core file, or install a plugin to get rid of stuff. plugins should be for adding functionality. Now it’s worth it because some idiot jesus freak thinks it’s okay to preach at people from the WTC.

Looks like i’ll be subscribing to Alex, Owen, and the other developers who have a sense of propriety in my RSS reader now. I would have thought after the mike little birthday incident, you would have the sense to tell your freaky religious zealot friends to keep their spammy preaching to themselves.

UPDATE:

due to x-Dashboard looking ugly(er) in Tiger Admin (it doesn’t use the #zeitgeist div, so the sidebar doesn’t float properly), I hacked /wp-admin/index.php to show feeds from Ozh’s Planet wordpress. (he has the good sense to only syndicate the wp-plugins category from WTC, hence, no jesus.