Moblogging For WordPress: The Ariana Solution

September 7th, 2006 | admin

So, as I said the other day, my friend Ariana hit the website with a big shitty stick until the moblogging system started working.  To a code-illiterate like me, this was not a small thing.  So I got her to write down how she did it.  Ariana’s explanation follows:

*   *   *   *   *

Note: This is only one way to enable mobile blogging with WordPress. There are other plugins out there that may work just as well, or better, depending on your set up, version, and preferences. This is just the way I set things up for Warren when nothing else seemed to be working.

What you’ll need:
1. A current build of WordPress.
2. A phone capable of sending email, photos, etc.
3. An email account that you will use exclusively for posting.
4. Posties
5. WP-Cron

What to do:

1. Download and unzip Posties, then upload the postie folder (using FTP or your cpanel) to wherever you have WordPress. All the files for Posties need to be in their own folder, so your directory layout should look like this:
wordpress>wp-content>plugins>postie>all the posties files

2. Next, download WP-Cron, unzip the folder, and upload it to the plugins directory as well. The directory layout for wp-cron should be:
wordpress>wp-content>plugins>wp-cron

3. While you’re in the admin panel or FTP application, back out to your MAIN wordpress directory (the one where the folders “wp-admin” and “wp-content” are). You’ll need to create two new directories:
wp-filez
wp-photos

These two directories need to be set to CHMOD 766. If you’re doing this from an FTP client, you’ll create two new folders, name them wp-filez and wp-photos, and then right-click to select properties, permissions, or chmod (depending on your program it could be any of those three). By default, folders are set to 0, so just change that number to 766. If you’re working through a web-based control panel, there should be a similar option either next to the folder icon, or at the top or bottom of the screen. If you’re doing this all via telnet or SSH, you should damned well know how to chmod files. If you don’t, close your terminal before you break something, and get an FTP client.

4. You can close FTP, or leave the cpanel now. Log into your WordPress account as Admin, and activate the following new plugins:
Cronless Postie
Postie
WP-Cron

Ignore all of the other WP-Cron plugins (Dashboard, Reminder, etc.) for now. You’re more than welcome to go back and look at them later, but they aren’t necessary for posting-by-phone. There’s relatively good documentation over at the WP-Cron page about all of the plugins, but the truth is that we’re just using WP-Cron because that’s what the Posties plugin needs.

5. If everything activated with no errors, you’re ready to configure Postie. From the WordPress Dashboard, choose Options>Configure Postie. You will need to set the following:

  • Authorized Addresses – These are the addresses you will be SENDING mail from. If you’re not sure what the email address of your phone is, send yourself a message.
  • Mailserver Settings – This is the email address that Posties will check for entries. Choose your mail protocol, the mail server, your userid, and your password.
  • All the other settings are options that you can explore once you’ve got Posties working.

6. Now, first test. Send an email from one of the “Authorized Addresses” to the account you specified in “Mailserver Settings.” Wait a minute, then click the Run Postie button at the top of the Postie Options screen. If you did everything correctly, a new entry should appear on WordPress. If not, back up and see if you missed any steps.

7. Cronless Postie + WP-Cron. Once you’ve got Posties working, you need to set up WordPress to automatically check for new emails. Otherwise, the only way you’ll be able to post is by logging in and clicking that little button. WP-Cron basically uses RSS feeds, webcrawlers, and other automated systems to trigger automated tasks. If your blog has a LiveJournal feed, for instance, WP-Cron will automatically run a list of commands every time it is accessed by the LJFeed aggregator. Cronless Postie is one of the commands that WP-Cron can run. Both need to be enabled for Postie to auto-update, and tiny bit of code needs to be inserted into your wp-rss.php file:

do_action(’check_postie’);

Cut and paste the above line of code into wp-rss.php. It goes by itself, on the line below the first } and above the word header.

8. Cronless Postie+WP-Cron may not work immediately. Remember, this is a workaround is based on RSS feeds and webcrawlers. If the only RSS feed currently subscribed to your journal is LiveJournal, you’ll have about an hour delay between fetch times,which means you could be waiting for up to an hour before an email post goes live. If that does not suit your needs, then you’ll need to subscribe to something that updates a little more often (try bloglines, or gmail rss). There are also known issues with the Cronless Postie app — in other words, if you just can’t get it to work, it’s probably not your fault. If your directory is anything other than normal (if you’ve got wordpress in a different folder than your main page) or if you have some arcane plugins that don’t want to play nice with WP-Cron, there’s not a whole lot you can do except Step 9 below.

9. Alternately, you can set up a webmonitoring service (like Easy Monitor) to check:
http://yourserver.com/wp-content/plugins/postie/get_mail.php.

Unfortunately, free Web Monitoring services are notorious for down times and error messages, so if you can get wp-cron working, it’s far more dependable. If your hosting provider comes with a Web Monitoring service, this is definately your best bet, because if their servers are down, there’s a good chance your site will be, too.

10. And that’s it. If you got it working, congratulations! Go get yourself a drink. You’ve earned it. If not, go get yourself a drink, anyway. You’ probably need it.

*   *   *   *   *

NOTES: if you’re going to use Gmail as your secret-address mailserver, remember to select POP3-SSL from the dropdown. 

ISSUES: Posting-to-blog via Flickr is currently not working.  I have not yet discovered whether the problem lies with the moblog solution or with my new phone.  If it turns out to be a conflict between the above solution and Flickr — well, since this solution allows you to post photos straight to your blog off the phone too, it’s not that much of an issue, is it?

My thanks to Ariana both for making the thing work, and for taking the time to write her steps down.

[TAGS]wordpress, moblog, post+by+mail, mobile, cron, postie, cronless, wp-cron, annoying+the+fuck+out+of+you+by+phone[/TAGS]


3 Responses to “Moblogging For WordPress: The Ariana Solution”

  1. Can I get away with plugging my company’s software? It seems on-topic enough for me to try…

    I work for ShoZu, which is a media uploader for mobile phones. It can upload photos and videos to sites like Flickr and WordPress, complete with tags and descriptions/blog text.

    It doesn’t need any cron jobs, no chmod-ing, certainly no code editing, or anything like that. And it’s free. You just need to sign up at ShoZu.com, configure where you want to send stuff, and download a client to your phone. Then you can start uploading pics and rants to blogs from your phone.

    http://www.ShoZu.com/

    If the site you want to upload to isn’t one of the main ones, like Flickr, check “other destinations” on the sharing tab, and you’ll find other sites, like WordPress.

  2. First things first – Mr. Ellis, if you could purchase your friend Ariana a number of beverages on behalf of the community, I’ll happily repay some of them in kind should I ever meet you (or her) in person.

    Secondly – if that ShoZu works the way the site says it should, I’m totally sold. Hell, I love a bit of tech, but idiot-proof sells to me every time…

  3. [...] 8 – Moblogging For WordPress: The Ariana Solution “…my friend Ariana hit the website with a big sh*tty stick until the moblogging system started working…So I got her to write down how she did it.” Helpful hints at warrenellis.com! (tags: tools hacks tricks cronless plugin tips moblog blog mobile wordpress) [...]