• I’m moving from a macbook to an iMac which gives me the chance to reconfigure my MySQL. So I want to do it the right way.

    When developing lots of different custom themes for clients, do you create a new wordpress database for each or do you have one wordpress database and just keep adding themes to the theme folder?

    I hope that makes sense.

    The issue is with multiple databases, I’d have to re download the plugins, and content each time. Plus when I’m done with a client, I’d just have an extra database (unless I go in and delete it).

    The issue with one main database and adding themes, is my theme folder gets mighty full, my database is HUGE, I have content and plugin customizations (like ACF Field Groups) that are superfluous, but I’m not sure I want to just delete.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Separate everything. Separate databases, separate folders, separate URLs. That keeps everything, well… separate. That way you can add and remove things as you need to, and you know that when you do remove something that it won’t affect anything else.

    Moderator bcworkz

    (@bcworkz)

    I actually do both because sometimes I’m contracted to only build a theme, someone else is managing the content. I develop the theme on my primary local test site. It seems like overkill to make a new installation just for a theme. I might import or create some sample data for testing, but basically all work is concentrated within the one theme. After a few months I archive the themes to a USB stick.

    But when I do create content or need to use an existing DB, I do create a completely independent installation on my local server. I even place the domain name in my local hosts file so the DB has the right domain references from the start and can be easily migrated to the production server. A virtual hosts file takes domain requests to the right sub-directory of my server. Several months after completion these too are archived. I never have all that many themes or installations on my server. I guess I’m just not that busy of a developer.

    • This reply was modified 3 years, 9 months ago by bcworkz.
    Thread Starter bwille

    (@bwille)

    Yeah, it’s not so much the content I’m worried about. I usually just have the test content. It’s more the custom plugins or ACF field groups that get overcrowded if I develop everything on my main wordpress instance.

    Someone suggested to me in another forum using multisite. So you could keep a set of common plugins and then have custom stuff for each site. I’m gonna look into that more I think too.

    Moderator bcworkz

    (@bcworkz)

    Meh, migrating a sub-site from a multisite installation to a single site production installation is a little messy. It’s doable, but I don’t like the messiness. And multisite isn’t 100% compatible with single site. It happens that code developed for one doesn’t always work right on the other. It’s rare, but possible.

    It is possible to redefine the path to wp-content through a wp-config.php constant definition. You could have multiple instances of wp-content for an otherwise single installation. Switch sites by changing the constant definition.

    In a similar vein, you could use a single DB and manage multiple sites by the table extension, also defined in wp-config.php. Swapping sites would be a matter of altering two constant definitions in one file. For me, it’s easier to just create a completely new installation.

    Why bother with a development platform?

    I like to go from idea to domain registered to website in about 20 minutes and I like the idea of continual ‘small step’ improvements. None of that requires a development system. WordPress has that ‘Famous 5-Minute Install’ – run with that.

    Just build the new site on the production server using the domain you’ve picked!

    Except for heavy customizations, a WordPress based website should be up and running from the ‘git go’. If you don’t want passerby finding and viewing your site for some reason use a maintenance plugin. Used properly… a configured maintenance plugin can hide your work from the public.

    If you really need a dev system for something that’s ‘being developed’ like a plugin or really cool theme, then build a dev box on your desk.

    But here’s the rub! You probably have an OS you like so you use a WampServer or XAMPP package so you’ll feel comfortable while you ‘think out loud on a keyboard’. Yet the host you’ll wind up on is something completely different. Something is bound to ‘fit wrong’. Use a dev box that is similar to what you’ll have on the production system.

    Thread Starter bwille

    (@bwille)

    @bcworkz I get that the multisite installations themselves aren’t great to transfer to a single site. But if I’m just developing the theme and plugins, are there any issues just uploading those folders/files to a single site production?

    Moderator bcworkz

    (@bcworkz)

    You’re right, moving multisite theme and plugin files is no problem, it’s migrating the DB where there are issues. All multisite wp-content data is in one place for all sub-sites, so you’re not gaining anything with respect to organizing your development work. The difference between multisite and single site is principally in the DB. The server files are mostly the same either way.

    I don’t entirely agree with a few of the things Jeff suggests, but there’s nothing wrong with his approach either. There are numerous approaches, you’ll need to find what works best for you.

    Another option if you want to do local development is “Local by Flywheel”. I’ve no experience with it, but others like it. I gather it’s similar to XAMPP, but super easy to set up. Not that XAMPP is difficult. There are a number of other local installation options. Personally, I have a native Apache installation on a Linux box. It works for me, but TBH it’s a bit of a pain. While I’ll do minor work directly on a production server, I prefer local development because it removes the need to FTP every minor edit back to the server, the files can be edited directly.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘What’s Your Developer Setup Like?’ is closed to new replies.