How to develop wordpress site collaboratively? - wordpress

For simple projects, it is suffice enough to use subversion to synchronise theme/plugin code between team's Wordpress installations. However, with larger projects, in which themes/plugins are content dependent, content needs to be synchronised as well. Is there a way to do it automatically instead of using Import / Export tools from Wordpress?

You can set this plugin to an hourly backup: http://wordpress.org/extend/plugins/wp-db-backup. It can send backups to email, save them on server or download them on your machine (if done manually). Content is saving its revisions anyway so I don't think you'll have problems with that.
SVN for the files sounds actually pretty neat, even without having other people working on your WordPress installation, but can you install svn client on a shared hosting? If you got a server of your own, this won't be an issue for you.
Hope this helps you a bit!

Related

Handling Git Deployment (WordPress)

So, like most of you, I develop my sites locally using MAMP. I've recently been learning git and in doing so, preparing to drop FTP from my workflow completely.
Though, I was wondering if there's a best practice for handling WordPress' databases.
Currently I'm only using version control on my current theme, but would like to expand this into controlling the whole site locally and pushing it to the server accordingly. That means making changes to files, adding posts/pages and generally mucking around with the whole site, keeping both local and remote site in sync. Is this possible?
I've read tons of guides over the past week, and followed countless tutorials, so any help would be appreciated.
Thanks in advance!
This is not really feasible, git is for file changes, not for your database. Due to how WordPress stores data in the database you cannot sync content without custom scripting (bash, ruby, etc) aka... jumping through hoops.
You can dump your database file using cron and throw it into git, but again you cannot sync the files due to how WordPress stores values.
This has been asked on https://wordpress.stackexchange.com/

creating a wordpress dev enviornment and uploading to production

I am an old school java developer who is considering a using wordpress. I'm used to developing locally on my PC (yeah yeah not even a mac) and then ftping my files up to a production environment on a remote server. My high level review of wordpress gives me the impression that typically there is no concept of lower environments and that all updates occur directly in production. Is this the case? If not, can someone explain how one goes about uploading the files to a web site?
Thanks,
Jeff
WordPress is database driven, so it doesn't rely on the cumulative process of building new HTML pages for every addition or revision, as you would do in Dreaweaver or something similar. The core files in a WP deployment are merely the shell to which content from the database is "hooked" in for display.
You can, however, setup a local environment for development purposes by using WAMP or MAMP (Mac). The process of transferring the site to production is a matter of FTP-ing the whole shebang, and then modifying the local database so that anything in it that says "http://localhost/testsite" is changed to "http://foamfrogs.com" or whatever. Then upload it to your hosting service's db server. It's a bit tricky, but once you do it a few times, it becomes routine.
there are a few products out there that can automate the process:
Backup Buddy: http://pluginbuddy.com/
ServerPress: http://serverpress.com/
I haven't used ether of these because I'm cheap and like doing things the long stupid way sometimes, but it might be worth it if you have a high volume of work and need streamlined workflow. - Steve
Wordpress is a CMS masked like a blogging - platform.
It is highly flexible, highly powerful and highly extendable.
It is running on PHO + MySQL.
If you never have used any CMS before - I suggest you do the following :
Download wordpress .
FTP it to your server .
prepare a DB (like in instructions)
Install.
Start to play !
(if you need documentation - look here and in your best new friend : the CODEX here
After you will do that - many things will start to be much more clear .
you can then start to extend it with themes and plugins .
Now - About the word "development" -
It really depends if by "development" you mean creating sites with wordpress , or creating the TOOLS for wordpress to create sites.
By tools I mean Developing themes and plugins (mentioned before )
This will come fast after that - but first , trust me - just start to play in order to understand the terminology and the process .
To make a simple website with wordpress - you actually do not need to be a programmer, just like the fact that my mom does not need to be a software engineer in order to use wordpad.
everything is with an intuitive user interface , and in the past it took me 20 minutes to teach computer - illiterate clients how to use it.
One of the greatest things about wordpress (and one of the biggest secrets for it´s meteoric growing and success ) is the wonderful and HUGE support base in form of the community , blogs, websites etc. etc..
Now - to really answer your direct question -
The opinions as to what is the "Über" dev environment for wordpress will be as numerous as the developers themselves, each has it´s own preferences and tools.
I can only recommend mine (which is also pretty common , but most importantly , EASY and SIMPLE)
If you are on PC (like you said) -
Download XAMPP - it is a one click installation of PHP + MySQL .
it even has a built in FTP server. it can even be portable (!!)
I have been using XAMPP for wordpress development for more 6 years now , and it has never failed me . configuration works out-of-the-box.
(MAC equivalent is WAMP or MAMP - but since I never had a MAC , and hopefully never will - I can not testify..)
Some other tools :
Tortoius SVN for, well .. SVN
FireFTP is always good to have.
and so does Firebug
..and if you are into theme design as well - web-developer is a
must
BONUS :
I do not use an IDE - but for wordpress I highly reccomand
NOTEPAD++ This is because when you start with wordpress, you
will need to handle CSS, jQuery, Javascript and of course PHP .and
NOTEPAD is actually the best to handle all together. Actually, with
the PLUGINS - Notepad++ can integrate all of the above together (yes,
PHP execution, DB connection, FTP, SVN integration etc, etc..)
On a personal note I must say that i owe all my programming skills to wordpress. when I started - wordpress was in it´s dipers, and I had ZERO programming skills.
Now wordpress is huge , and even if i still regard myself as a novice - have already made a dedicated industrial scale system for hotels managements integration - all based on wordpress.
this last part is not to hail my own skills, but what I said in the begining:
wordpress is highly flexible, highly powerful and highly extendable.
that´s all you need to know .
Now go and play !
Just a quick tip from me - when moving Wordpress databases from your local development environment to another server the big pain in the neck is that fact that Wordpress itself (and lots of plugin/theme developers) used serialized arrays to store data. So if you do a find-and-replace on the database to replace your old url with the new one, you will disable lots of things like config settings and widgets (text widgets specifically, but there's tons loads of stuff you end up having to recreate).
My recommendation is this fantastic piece of code here;
http://interconnectit.com/124/search-and-replace-for-wordpress-databases/
What a time saver, you just upload your Wordpress database, upload this script to the root of your server and run through the quick form. Bingo, all urls changed, no problem with serialized data being lost.
Big speed increase when deploying sites.
And in reference to your question on files - you just FTP the lot, the only thing you have to change is the .htaccess (likelyhood is your site will not be in the root in development but it will be in production) and the wp-config.php file that gives database connection details. That's it.
Good luck!!

Build an Offline website - Burn it on a CD

I need to build a website that can be downloaded to a CD.
I'd like to use some CMS (wordpress,Kentico, MojoPortal) to setup my site, and then download it to a cd.
There are many program that know how to download a website to a local drive, but how to make the search work is beyond my understanding.
Any idea???
The project is supposed to be an index of Local community services, for communities without proper internet connection.
If you need to make something that can be viewed from a CD, the best approach is to use only HTML.
WordPress, for example, needs Apache and MySQL to run. And although somebody can "install" the website on his own computer if you supply the content via a CD, most of your users will not be knowledgeable enough to do this task.
Assuming you are just after the content of the site .. in general you should be able to find a tool to "crawl" or mirror most sites and create an offline version that can be burned on a CD (for example, using wget).
This will not produce offline versions of application functionality like search or login, so you would need to design your site with those limitations in mind.
For example:
Make sure your site can be fully navigated without JavaScript (most "crawl" tools will discover pages by following links in the html and will have limited or no JavaScript support).
Include some pages which are directory listings of resources on the site (rather than relying on a search).
Possibly implement your search using a client-side technology like JavaScript that would work offline as well.
Use relative html links for images/javascript, and between pages. The tool you use to create the offline version of the site should ideally be able to rewrite/correct internal links for the site, but it would be best to minimise any need to do so.
Another approach you could consider is distributing using a clientside wiki format, such as TiddlyWiki.
Blurb from the TiddlyWiki site:
TiddlyWiki allows anyone to create personal SelfContained hypertext
documents that can be published to a WebServer, sent by email,
stored in a DropBox or kept on a USB thumb drive to make a WikiOnAStick.
I think you need to clarify what you would like be downloaded to the CD. As Stennie said, you could download the content and anything else you would need to create the site either with a "crawler" or TiddlyWiki, but otherwise I think what you're wanting to develop is actually an application, in which case you would need to do more development than what standard CMS packages would provide. I'm not happy to, but would suggest you look into something like the SalesForce platform. Its a cloud based platform that may facilitate what you're really working towards.
You could create the working CMS on a small web/db server image using VirtualBox and put the virtual disk in a downloadable place. The end user would need the VirtualBox client (free!) and the downloaded virtual disk, but you could configure it to run with minimal effort for the creation, deployment and running phases.

wordpress deploying solution, ideas?

I develop on a local machine a Wordpress site and I'm now looking for a mechanism to deploy it easy and fast. I'm thinking about a DEV environment (located on my local machine), a STAGING environment (a subdomain on the client page, maybe staging.example.com) and of course a LIVE environment (example.com)!
My current workaround:
As I work with Aptana I'm able to sync my changed files with the deploy mechanism the IDE provides. Exporting my local database, finding/replacing the permalinks and importing the whole thing - finish! To deploy live, I have to replace all staging files with the live files.
This should be easier! Is there anyone out there, having a better workflow?
I'm open and really excited about your ideas!
Thanks a lot
greetings
Yep, it's frustrating and completely insane that Wordpress requires this process because they put absolute urls in the database. I develop in a similar fashion using multiple staging sites for qa and client review. After my first deployment with Wordpress I almost gave up on the platform entirely. All of the solutions recommended by core developers and others simply didn't work.
So I wrote a plugin: http://wordpress.org/extend/plugins/root-relative-urls/
that fixes the problem. With this plugin you don't need to do a search & replace on your content. No hosts file hacks, or dns tricks. With my plugin you can access the site via IP address or Computername or any type of forwarded host. And since it converts urls to root relative before they enter the database, you won't have to worry about them working between the different domain formats. And since they don't hard-code the scheme (http/s) in the url you won't have to worry about the 520 or so bugs that were reported in the wordpress trac database if you use SSL.
It's a staple for any wordpress project I work on these days. And I have written a couple other plugins to deal with idiosyncrasies that exist in the platform that you can check out here: http://wordpress.org/extend/plugins/profile/marcuspope
Hope that answers your problem.
I use Capistrano https://github.com/capistrano/capistrano/wiki/ for all my deployment needs and it is really good solution. You can simply script anything and it just works.
It could work for your deployment scheme too.
I also use Capistrano for both WordPress and Drupal deployments. I typically install modules locally for testing then push to test and production environments. For uploads, etc. I add custom tasks to manage syncing files stored in scm and those that are not. Here is a simple guide I put together.
http://www.celerify.com/deploy-wordpress-drupal-using-capistrano

Wordpress pages and version control

We are a software development company and are using Wordpress for static portion of the web site. Naturally, all our workflow is built around version control: multiple developers -> continious integration -> staging -> deployment.
Our challenge with integrating Wordpress into our workflow is that its database is stuck like a bone in the throat: you cannot put it into the version control, easily roll back, promote from staging to production etc.
I am wondering what people do in similar situations? I would like to find a way to integrate WP into the development workflow and not the other way around :-)
Clarification we want to "develop" and test pages on the staging system and when ready then move them over to the production as part of the version upgrade process. We don't want to do full replication of the staging database to production.
That's a common question and one that I've worked on tackling. I've written some code to address these issues albeit the code's not ready for distribution. Basically the idea is to create scripts to import the content and then version control the scripts. (Actually my approach uses a custom import/export format designed to be easy to hand-modify, but the idea is similar.)
Anyway, there are some related questions over on StackOverflow's sister site WordPress Answers:
Questions tagged with the term [staging]
Questions tagged with the term [deploy]
UPDATE
Per the clarification, this would probably be helpful too:
Is there any way to draft a revision of a published page or post? What workarounds have you used?
Hope this helps.
-Mike
I've just hit the same problem. For now we are using MySQL dump files to export/import database content, but it gets ugly with several people working on the database changes.
Since the team that works on the project is all internal and consists of just a few people, I'm thinking into the direction of locking the database dump file in VCS. Subversion had this functionality built-in, but we are using git, which, I think, is conceptually opposite of any kind of locking.
Probably we'll have a workaround script with pre-commit hook to check for the existence of a lock file next to the dump. The person who committed the lock file will be the only one allowed to commit the dump. Once he finishes the work, he will need to commit the removal of the lock file.
It sounds ugly, I know. But I've thought about it for a while and don't see an elegant solution yet.
If you're only using WordPress for static content, then any tool/methodology for version controlling databases should work - for example, work the mysql command line tools into your CI and deployment routines.

Resources