Skip to main content

% blog read

Setting up a sample WordPress build: a collaborative post

Anna Appleton-Claydon

By Anna Appleton-Claydon

1st Dec 2017

Web development
Setting up a sample WordPress build: a collaborative post

With every WordPress we do, there are a number of standard tasks that have to be repeated. To improve our efficiency, we have set up a standard sample WordPress build that we can use as a starting platform for every new WordPress project. This has several benefits for us: it is more cost effective, and we can pass these savings onto our clients; it will bring consistency to every build we do; we don’t have to refer back to any notes or remind ourselves how to do something; and it helps us to complete a project more quickly.

As we work in a collaborative industry, we are sharing the details of our sample WordPress build.

Source control

All of our work is source controlled, and we wanted to use phpdotenv (influenced by Laravel) to store all configuration details in one file, that is stored on local and external builds. By only storing this information on a server itself, and not in source control, we are helping to keep confidential information secure.

For our source control we use Git across all projects that enables us to track changes and manage team collaborations of projects more efficiently. We work towards a setup to manage development, staging and live variations in the construction of a website. This can start with a development version that has all the code in an expanded, readable format that our team can work with and understand more easily.

When preparing for going live this code is processed through our automated setup to compress and streamline pages, images and other supporting code. This provides for optimum performance and taking away code redundancy once pushed to the live server.

ENV

Defining the environment of the build (local, dev or live) produces the relevant debugging tools available to us. This will help us to solve problems faster.

We have pre-installed all plugins we typically use (such as for contact forms) and have configured them so they are ready to go. If we end up not using some of these plugins, we will simply remove them. Within ENV, we have also built in code for Google Analytics to generate itself when specified.

The configuration is set up so we can specify whether SSL is used, and if the answer is yes, the website automatically converts to HTTPS when refreshing permalinks (all the relevant code is inserted into the .htaccess file). As we know there is a growing need for an SSL and all our websites now use SSL so this helps streamline the process.

Sage

Sage is a starter theme for WordPress, which we use and adapt rather than using one the vast number of heavy and bloated ones with features that our clients may not need and may pose extra performance and security vulnerabilities. We like to build themes from scratch as much as possible so using Sage allows us to save time in the basic plumbing of a WordPress installation before moving onto the design and build of a website and its content architecture.

Within Sage we have already set up sample code for AJAX and post requests, for when we need to write some bespoke code to handle data. We also have a number of security improvements and clean-up scripts added in to keep the themes nice and tidy.

ACF

We use Advanced Custom Fields to make our WordPress interfaces even easier to use. Originally WordPress didn’t include a simple way to manage additional content fields on pages and posts, but thanks to the ACF plugin, and later the pro version, this is now more effortless. Virtually all our WordPress sites use ACF to offer our clients fully editable content on their website. Typically custom fields include anything from additional text content areas for pages to specific settings for different colour settings and layouts.

Most of our WordPress builds have global fields available, so we have that on default with sample fields available, should they be required.

This is a working build and is likely to evolve with every project we do. If you have any suggestions or questions about this, get in touch and we would be happy to talk it through with you.

DEV ONLY: Contact form

Want to find out more?

Embark on a journey with us to transform your digital presence. Our collaborative approach ensures tailored solutions. Let's bring your vision to life together.
Get me started

Latest industry insights.

Explore the forefront of industry trends and innovations through our latest blogs where we unpack cutting-edge strategies, share expert perspectives, and keep you informed about the dynamic.
Choosing the right CMS for your business website
01 September 2024

Choosing the right CMS for your business website

As the internet has expanded over time, so too has the list of software tools available to help people and businesses achieve their online goals. For many people, they just don’t have capacity to understand the full list of available options and often end up choosing the ‘flavour of the month’ or the options they have seen advertised most recently.

Internet business insights in 2024
13 March 2024

Internet business insights in 2024

The internet in 2024 is a constantly shifting and evolving marketplace. When considering specific habits between individuals in the retail space and business users in a commercial setting, there are some interesting insights and trends that have begun to emerge.

Commercial and retail customers
28 February 2024

Commercial and retail customers

Many companies we work with supply products to both trade (or commercial) customers and also provide products and services to retail customers. Often they have concerns about how they can provide a single website that meets the needs of both customer types effectively. 

Got a project in mind?