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 https://kristarella.blog, 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. 😉
David says
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.
antiquarian books says
Thank you for this information. 🙂
Simon says
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
kristarella says
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.
Starstuff says
Hello Kristarella,
do you by any chance have any advice on how to get Coda and MAMP play nicely together. I’ve only recently purchased Coda, but have used the trial version last year. I have NEVER been able to get Coda work with MAMP. I’ve searched the forums and blogs and discussion groups and tried out so many different settings I don’t know what else to do.
My MAMP installation is the very basic installation in my /Applications folder. I created a new folder within /htdocs with my WordPress setup. I can access it fine through Safari directly, but once I try to have Coda access it, nothing works. I always get the error message that the Localhost can not be reached, hung up and so on.
Do you have experienced that kind of issues, or could you possible post your own settings of MAMP and Coda so that I could possibly figure out why it refuses to work? Any help would be greatly appreciated.
All the best,
Starstuff
kristarella says
Starstuff — I haven’t come across any problems like that. I don’t use the built in preview very often because editing WP template files, the preview of the file is not that useful. I tried it just then with a site at the root of my Sites directory and it worked fine.
Differences in my set up include using the Sites folder instead of MAMP/htdocs. You can set it to do that in the MAMP options. I find it more convenient for accessing files. I’m also using a custom domain name on my MAMP installation, which can be done by following steps 1, 2 and 3 of this tutorial (although I think in step 2
ServerName http://wordpress.mu/
should actually beServerName wordpress.mu
.I don’t know if any of those modifications affect the problem you’re having or not.