Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to build several highly customized WordPress instances beyond look and feel changes. For example, in one of the instances, any categories with children need to display in its own dropdown on the post edit page. I can not use multi-site setup as each instances may need to be highly customized.

I would also like to have these individual projects to share the same base code, i.e. standard WordPress installation with some shared logic like security patches, caching, and so on.

Currently, I have the following layout in my source control:

root
    +---wordpress_base
    +---project1
    +---project2

wordpress_base contains the wordpress source tree. project1 and project2 contains only the files that are changed for customization. During deployment, my ant script will combine wordpress_base with the custom code from a specific project.

Is this a good way to manage mutliple WordPress source code? I have no expertise in php/wordpress development. Feel free to let me know what I am doing is stupid and suggest the right approach.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

As mentioned before, never, ever, modify wordpress core files. It is a maintenance nightmare and a security risk, and very, very bad practice.

During development the only area you need concern yourself with is the wp-content folder, specifically plugins and themes. Put post type registrations, url rewrites, custom taxonomies etc in a plugin, and visuals in themes.

Assuming you have svn or git as your version control, I would give wordpress_base its own repository. Then give each project a repo, containing the project folder, and an SVN External/Git submodule, that pulls in the base wordpress theme.

This way each project has its own repository, and its own history, but all share the wordpress_base folder, which is tracked separately and automatically pulled in via version control.

Also have you considered wordpress child themes instead of your Ant script?

Also if you're working with Git, you can add an autodeployment script that puts a copy of the repos latest files from a branch in your live folder when you push commits to that branch on to the server.

share|improve this answer
    
Thanks for your answer. The customization I need are mostly in the admin pages. Would theme and plugin be applicable there? –  ltfishie Feb 27 '12 at 17:38
    
You can make extensive changes to the admin area using plugins and themes using the same APIs wordpress does. Look at the codex and docs for examples, and other plugins.You can add and remove pages, reorder them, restyle them, etc etc etc –  Tom J Nowell Feb 27 '12 at 17:39

My suggestion would be to do all your customization through custom Themes and Plugins. You should never modify any of the core files, as this will make future auto-updates break your site (and is a bad practice in general).

So you can keep your themes and plugins in SVN, and each site will just be a custom combination of theme + plugin.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.