How can I make my website update itself automatically?
January 17, 2013 12:35 PM   Subscribe

I'm creating a simple website. It will be a single page with a photograph and a block of text. I will need to update it with a new photograph and a new block of text at a certain time each day, say midnight. I anticipate being able to do this manually most of the time, but would like an option to somehow pre-load at least one photo and text block and have the site automatically update if needed. It would also be great to have multiple days' worth ready to go without human intervention.

More info:
- I can do this in Dreameaver on a hosted domain, or use Wordpress, or whatever solution works.
- I'm not a code-monkey, but have no problem with cutting and pasting code, editing parameters, etc.
- I don't care if the solution involves "bouncing" the main URL to a date-specific one. (For example: bounces to at a specific time on January 13.)
- This doesn't have to be fancy or clever; I value simplicity and sustainability.
- I don't mind if the best solution requires a purchase.
- By "automatic" I don't mean I pay someone to do it for me; I can already do that.

Thanks in advance!
posted by The Deej to Computers & Internet (9 answers total) 6 users marked this as a favorite
Wordpress works for this- you can set publish dates on any post. Write it, save it, but set the post date/time to whenever you want in the future.
posted by matcha action at 12:39 PM on January 17, 2013

If your web host allows cron use and simple shell scripts, it shouldn't be hard at all. Just schedule a cron job that runs a script that makes "today's" page the index page. Whether you find Wordpress simpler depends on what exactly you mean by "simplicity". It would definitely be simpler to set up, although it would also have vastly more in the way of moving parts.

You could then upload 013113.html to the server at any time you like before the day itself and the cron job will take care of the rest.

A script something like this might work:

FILENAME=`date +%y%m%d`.html

rm ${WEBROOT}/index.html

if [ -f ${WEBROOT}/${FILENAME} ]; then
  ln -s ${WEBROOT}/${FILENAME} ${WEBROOT}/index.html
  ln -s ${WEBROOT}/error.html ${WEBROOT}/index.html
Set it to run 5 minutes after midnight every day and your page will be updated each day. Plus you have all your old pages archived automagically. Obviously, a CMS will be better for many uses, but if you really don't want/need one, this should do. I may well have typoed something. MeMail me if you want to use it and have trouble.
posted by wierdo at 12:55 PM on January 17, 2013

The simplest route would be tumblr. You can queue posts and schedule them to go live at a specific time, or X hours apart.
posted by desjardins at 2:30 PM on January 17, 2013 [1 favorite]

With Wordpress, just set a bunch of posts to publish at specific times, then have your homepage set to display just your most recent post. No need to bounce people to other URLs.
posted by belladonna at 2:54 PM on January 17, 2013

I think the OP is looking to make a queue of backup posts so that on the off days he isn't able to update his website the site will update itself with one of them.

If that is the case then this wordpress plugin: sounds like it may do the job. From its description:

A plugin that automatically schedules posts depending on a min/max threshold and the last post's publish date and time.
posted by any portmanteau in a storm at 7:06 PM on January 17, 2013

Re: Wordpress: you don't even need a plugin, Wordpress supports it right 'out of the box'. From the support page:

"You can schedule blog posts to automatically publish themselves at any time in the future. "
posted by matcha action at 7:28 PM on January 17, 2013

Thanks everyone! I'll look into which solution works best for my needs. Looks like I have several options.
posted by The Deej at 8:01 PM on January 17, 2013

I've finally had time to get hands-on with your answers.

I'll be using the Wordpress solution, because I'm familiar with WP and can deploy it on my own domain. Despite having used it for many years, I had no clue about the scheduled publishing, and obviously my pre-AskMe Google attempts were futile.

I'm marking the tumblr answer as best answer as well. Tumblr will not be my main site for this project, but I will set up an automated tumblr that will link to my main site. That answer also reminded me that I never did set up a tumblr under the name I use for my photography, so thanks for that!
posted by The Deej at 9:33 AM on January 27, 2013

Update for posterity:

Although the Wordpress auto-update answer is technically the best, so far I have not gotten it to work for me. Google tells me I am not the only one. I'll keep trying to work this out and report back if I solve it. (I won't go into details here; I'll create a separate AskMe if needed.)

However, until I can get it to work truly automatically, Wordpress is still my choice because I can create a bunch of posts in advance, and publish them from my iPhone or iPad with just a click or two.
posted by The Deej at 5:32 PM on February 18, 2013

« Older You Don't Fire Me, I Contract!   |   Bloody useless as it stands, innit? Newer »
This thread is closed to new comments.