How to Set up a WordPress Development Environment


Published at tips tricks by Elle Holder on 07th May 2021

What do you think of when you hear the words WordPress development? For some, it might mean downloading WordPress, installing a theme, and maybe tweaking it a bit using a site builder. And to some degree, they would be right. They could say they had done some WordPress development.

For others, those words mean so much more. They’ve spent countless hours studying the WordPress Codex. They understand the technology behind WordPress—meaning they know PHP and MySQL and understand its best practices. They could build a simple theme or complex plugin from scratch.

This article isn’t for the second group, since they’ve already been there and done this. And if you’re happy being able to download and install WordPress, a theme, and a plugin or two, it’s probably not for you either.

However, if you’d like to move beyond that first group and maybe delve a bit deeper into WP development, this article is for you.

Table of Contents

Why Learn WordPress Development
Set up a Local WordPress Development Environment
Learn the Fundamentals of WordPress Development
WordPress Development: Moving Past the Basics

Why Learn WordPress Development

WordPress Development

Source: WordPress.org

Since you’ve read this far, you’re clearly interested in web development. And frankly, anyone interested in web development should at least consider WP development.

Why?

Because data shows that WordPress is the single most popular web platform used today. As of April 2021, 41.1% of all websites are powered by WordPress. Of websites that use a content management system (CMS), 64.8% of them are using WordPress.

I would say above numbers speak for themselves. Even if you were only mildly interested in web development, WordPress development should be on your radar.

Businesses of all sizes are looking for websites that are scalable and reliable. And businesses that may not have had a strong web presence before are certainly trying to fix that in the age of COVID-19. And many people who have lost jobs or have jobs that don’t allow them to work from home are trying to find new careers.

Is this a match made in heaven?

Even if you’re a complete beginner who to date has simply had fun tinkering with WordPress, learning more about WordPress development might be a wise choice.

Let’s talk about what steps you can take.

Set up a Local WordPress Development Environment

Local WordPress Development

Perhaps you already have a website, and it’s led you to an interest in WordPress development. But if that site is in use, and you only have hosting for a single site, how can you play learn more?

A local development environment gives you the place to do this. Basically, you use your computer to run your website instead of paying for hosting. There are a few options to use, but my favorite is XAMPP. However, another option is MAMP.

While you’re able to create simple static sites using HTML and CSS in a text editor, you can’t do that with WordPress. WordPress development involves databases and PHP to create a dynamic site. For that, you’ll need to replicate server software and run your site locally.

Whether you are a beginner or a seasoned developer, here are some of the benefits of using a local environment for WordPress development.

Benefits of a Local WordPress Development Environment

XAMPP

Source: Apache Friends

If you plan to install XAMPP on a PC, here is a Windows install tutorial.

Use this video tutorial if you are installing it on a Mac.

Okay, back to assuming you are a beginner when it comes to WordPress development.

At this point, you want to learn the fundamentals. And just because you’ve installed the core platform plus a theme and a plugin or two doesn’t mean you understand the fundamentals of WordPress development. Far from it.

Learn the Fundamentals of WordPress Development

Now that you have your local WordPress development space set up, it’s time to dive in.

Understand the Foundation of WordPress Development

PHP

Source: Wikipedia

WordPress themes are designed using HTML and CSS, so having a familiarity with both languages already is a good start. However, everything in WordPress is stored and accessed using databases, and the language used to communicate with them is PHP.

Having a working knowledge of PHP is going to be critical. Here are some online resources that can help solidify your knowledge of the language:

  • Codecademy. With a basic understanding of HTML, you’re good to go. This is a free, 25-hour course that will provide you with the fundamental programming concepts of PHP.
  • Codecourse. Codecourse offers multiple PHP courses, all used in WordPress development, including PHP Basics, a 5-hour course, and PHP Essentials, a 3-hour course.
  • Treehouse. Treehouse offers beginner, intermediate, and advanced PHP courses. Their courses range from about 1 to 2 hours in length.
  • Tuts+. Tuts+ offers a variety of PHP courses. A few examples are PHP Fundamentals and Learn PHP for WordPress.
  • W3Schools. W3Schools is a favorite site of mine, offering simple tutorials and how-tos. It will take you through PHP basics and provide you with exercises.

Theme Development

With a sound understanding of PHP under your belt, you’re in a position to move on to the next learning curve in your WordPress developer dream.

Developing a simple theme is likely one of the best places to start.

If you don’t want to start completely from scratch, you do have a few options. Please note the following two examples are “sample” or “bare bones” child themes that are offered with paid WordPress theme builder platforms.

The Divi Page Builder offers a Bare Bones theme.

WordPress Development Divi

And when you install it and access your site, your home page will look like this:

Bare Bones Home Page

Hardly inspiring, right?

All that’s provided there is a header and footer.

Here’s another example, this time with the Genesis Framework sample child theme. Again, just a header and footer, although if you didn’t know what you were looking for in each case, you wouldn’t know that.

Genesis Sample Home Page

Regardless, in each case, you have something of a blank canvas to start working on. And it doesn’t matter what kind of mistakes you make, because this isn’t a live site.

Having said that, it’s a very good practice to take a backup when you have something the way you want it. Because it’s extremely frustrating to work for hours to get something right and then lose it.

The beauty of your WordPress development local environment is that you can install plugins as well. For taking backups, I would recommend WPBlazer, which will let you create on-demand backups as you go.

Here’s a list of resources that will provide expert, trustworthy guidance. Each of them can guide you in the theme development process and get you off to a good start.

  • Since WordPress developers released Gutenberg, there has been a lot of interest in working with block-based themes. You can learn all you need to know about designing blocks at Theme Shaper.
  • They have a current repository of 88 articles that are specifically geared to WordPress development. And they aren’t limited to theme development, so there is a lot to learn here.
  • . When looking for information, it always helps to go right to the source. Within the Codex, a fledgling WordPress developer can find all the information they need.

Where to from there?

Assuming you’ve made it to the point where you can create a theme from scratch—and note that the Divi and Genesis examples above don’t really qualify as “from scratch”—it would be a good time to consider developing a plugin. This would still be considered as one of the fundamentals of WordPress development.

Plugin Development

WordPress Plugin Development

By now, you should have a sound understanding of WordPress itself. The referenced material above would have given you the necessary guidance, and you should know and understand what I’m talking about when I mention things like functions and the loop.

You should also have an understanding of WordPress best practices because no one wants a developer who doesn’t follow them.

Part of the beauty of WordPress is incredibly large community. As a budding developer, you can literally find any information you need online. The community is wonderfully helpful and ready to share.

Since WordPress core files are overwritten with every update, added functionality can’t be coded in at that level. Installing a plugin allows users to extend the functionality of their sites without having to worry about ever touching the core files. This is why many consider WordPress plugins to be crucial.  

Like I did for the themes section above, here is a list of resources you can refer to which will assist in the plugin development phase of your learning curve.

The Plugin Developer Handbook

WordPress themselves offer a Plugin Developer Handbook. It provides in-depth information on the following, plus much more.

WPMU DEV

The developers here provide a getting started section for the plugin side of WordPress development. It covers everything you need to know, but it isn’t geared towards those with little to no WordPress development experience.

Add to those two, both Treehouse and Tuts+ mentioned above also provide extensive courses on WordPress plugin development.

WordPress Development: Moving Past the Basics

If you have followed along so far and gone through all the courses and training mentioned above, you can say you have a solid grasp of the foundation of WordPress development.

But there is so much more.

Now that you’ve become completely familiarized with WordPress core and developing themes and plugins, you’re in a position to ramp up your game even more. And part of that comes from learning more than just the basics of a few of the languages mentioned in the WordPress Developer Handbook.

Let’s talk about JavaScript and jQuery specifically.

JavaScript

JavaScript

Source: Wikipedia

JavaScript has played an important role in WordPress development for a long time now.

For the most part, we could explain JavaScript as being client-side programming that can be used to alter the existing HTML and CSS of a site. But that’s not it. You can also use it to:

And assuming JavaScript hasn’t been turned off on a destination browser, it can also gather data and help sites load quicker and more efficiently.

The problem is, even if you’re just looking to make a small tweak, you want to be sure you’re adding a script properly. Because if not, you could ruin your whole site.

Of course, I’ll provide you with a few resources to get you started.

Codecademy. Again, Codecademy has a free course to offer. It’s a 30-hour course with no prerequisites. You’ll come away from the course knowing the latest JavaScript syntax plus all necessary programming fundamentals.

Eloquent JavaScript. You might want to check out this book as well. It’s now in its third edition and is available to read free online, or you can purchase a print version.

jQuery

jquery

Source: Wikipedia

jQuery is included in WordPress core code and it’s also used in many themes and plugins. So mastering it is a great idea. However, before you go down this road, be sure you’ve done your JavaScript research first.

Because you need to be familiar with JavaScript to use jQuery since jQuery is a JavaScript library. It’s a popular choice for WordPress developers thanks to its ability to create unique, dynamic sites. It’s also a great choice for plugin development. So if your goal is to learn WordPress development—and master it—you want jQuery in your repertoire.

As far as resources and tutorials go, there are a few.

jQuery Learning Center. This is provided by the jQuery team themselves. It includes an explanation of the basics, best practices, how-tos, and workarounds for common issues.

W3Schools.  Here you’re provided with an intro into jQuery, plus examples, exercises, and quizzes.

Wrapping Up

And that’s it. If you follow all the steps outlined above, you’ll be able to handle the WordPress development process. And while it may sound intimidating, it really isn’t. Especially if you have a basic knowledge of WordPress already.

To get started, how about another exercise? Choose a theme you really like. Spend some time considering the elements and see if you can create something similar.

You should also consider installing WPBlazer. As I mentioned earlier, you can use it to create backups as you go, but you can also use it for WordPress installs, clones, and more.