WordPress using Coda and MAMP

Wednesday, August 6

tagged as , , , ,

in Tech

Venturing into the world of Coda

A few things brought me to test out Coda. When I first heard about Coda I didn’t look too closely because of the price tag, but after Esben’s comment on my Smultron post, I downloaded the trial.

Soon after I started testing it I realised that it’s not really a text editor: it’s a website and coding management system. Quite a nice one at that.

For a great description, and summary of features, see Charity’s post Clever Development with Coda.

Managing an online site locally

I posed the question on Charity’s blog as to whether you can use the same files for your online site and local site, so that you can keep things in sync. A while later I realised that the question was rather similar to the Multiple WordPress blogs question that I’d already asked and answered.

The only limitation in using the same files is, if you open the site using your localhost (i.e. using MAMP), it will try to use wp-config, which has your server’s database settings.

All I had to do to allow my local server to use the files that correspond to my online site was to use the PHP “if” statements.

If I’m at http://www.kristarella.com, use the server’s database, else use my local database.

Check out my post on modifying wp-config to use different databases to see what I’m on about.

Smarter site management ahoy!

I think this system can be great for developing themes and customising your site. However, be aware that there’s a couple of things Coda doesn’t do: mainly, it doesn’t recognise when you change files through another program. So, it doesn’t realise that you have unpublished files when you move a whole folder in Finder, or when you’ve updated a plugin through WordPress. When Coda can automatically detect file changes, it will be totally sweet.

It’s pretty cool as it is though. ;)

{ 1 trackback }

kristarella.com in 2008 — kristarella.com
Wednesday, December 31 at 14:08

{ 4 comments… read them below or add one }

1 David Tuesday, August 12 at 00:25

Ah welcome to the world of coda. It really is a great application but I too wish it would automatically detect file changes. Fingers crossed that will be in the next update.

I never thought of sharing the same wp-config file for my local version of WordPress, I currently just have two seperate files and just sync the rest of the files in coda, but it would simplify things if I could just have one shared file. I will have to try your little trick out soon.

2 antiquarian books Friday, December 12 at 00:13

Thank you for this information. :)

3 Simon Sunday, March 8 at 21:15

Is there a great step by step tutorial on how to do all this from the beginning? Id really love to have a local copy of my files, but I fer I’d do something wrong and lose everything in the process…thanks

4 kristarella Monday, March 9 at 08:27

Simon, the easiest way to do that, if you don’t already have a local copy of your files would be to make a folder in your Sites folder, create a “Site” in Coda with the FTP details of your site and the local root being the folder you just made. Connect remotely to your site and select everything and “Download to” the folder, or “Reverse publish” to the folder. If you’re not familiar with Coda that might not have made any sense, but once you open it I think you’ll see what I mean. Sorry, I’m not aware of any tutorials.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Want to show some code in your comment? Encode it first so that WordPress doesn't strip it away.

Read the comment policy.

Previous post: Google Streetview in Australia

Next post: Combat spam with Gmail