Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Delicious Brains:
WordPress Deployment Part 3: Deploying WordPress Using Git
Aug 14, 2018 @ 09:37:04

The Delicious Brains site has continued their series covering WordPress deployment with part three: Deploying WordPress Using Git. While their instructions relate to WordPress, the examples given would work for any PHP-based application.

In my last article, we looked at deploying WordPress using some different command line (CLI) tools. In this article, we’re going to look at how we can deploy WordPress using Git, both manually via the CLI and also automatically when you push code to your remote repository.

They start by listing out the tooling you'll need to follow along - Git and Composer - and an example repository you can work from. The post then walk through three different methods you can use to deploy making use of Git:

  • a "git pull" on the production server
  • automated deployment via webhooks
  • deployment using a continuous integration service

For each item there's a brief summary included as well as configurations, screenshots and setup instructions.

tagged: wordpress deployment series part3 git composer tutorial

Link: https://deliciousbrains.com/wordpress-deployment-workflow-git/

Delicious Brains:
Improve Page Load Time For Your WordPress Site With WP Offload S3: A Case Study
Aug 08, 2018 @ 09:45:48

On the Delicious Brains site there's a new tutorial posted for the WordPress users out there sharing a case study of the performance impact of WP Offload S3 on the average page load time.

One of the great things about working at Delicious Brains is working on products that I use and love outside of work. I was a WP Migrate DB Pro customer well before joining the team and still use it daily on personal sites and side projects. However, I’ve not often had the need to use our other plugin, WP Offload S3 to offload site media files to Amazon S3.

The post starts with some of the background on why the author chose the WP Offload plugin in the first place and what features it provided. The tutorial then walks you through the installation process and how to have assets served up by Cloudfront correctly. It also includes some things you should consider when figuring out if this setup is for you. It then wraps up with some benchmarks of the results post-implementation, seeing a decrease of almost a second off of the previous page load time.

tagged: wordpress tutorial page load performance timing wpoffloads3 plugin

Link: https://deliciousbrains.com/improving-page-load-time-wordpress/

Delicious Brains:
Hosting WordPress Yourself - Ongoing WordPress Server Optimization & Maintenance
Jul 31, 2018 @ 09:36:54

The Delicious Brains site has posted the final part of their "Hosting WordPress Yourself" series to their site. In this latest tutorial they cover ongoing maintenance tasks for your server to keep it running smoothly and secure.

So you’ve followed our in-depth guide and built yourself a shiny new server that’s secure and tuned for optimal WordPress performance, but what’s next? In this installment of Hosting WordPress Yourself, I’m going to outline a few tasks that should be carried out on a regular basis to ensure that your server continues to run securely and perform well. We’ll look at performing software updates, upgrading PHP, and a few “gotchas” to watch out for that we may have experienced ourselves. Let’s dive straight in!

The article is broken up into several sections, each with a summary providing a bit more background:

  • Keep Plugins and Themes Updated
  • Check Backups are Running
  • Keep an Eye on Server Metrics
  • Watch Those Log Files
  • Update Server Packages
  • Upgrade PHP

They also talk about upgrading the OS itself (Ubuntu) and how to outline an action plan that, when used regularly, can keep your system and software up-to-date easily.

tagged: wordpress hosting guide tutorial series part11 ongoing maintenance

Link: https://deliciousbrains.com/hosting-wordpress-yourself-server-maintenance/

Delicious Brains:
Build A WordPress Plugin With Vue 2
Jul 11, 2018 @ 10:46:16

On the DeliciousBrains.com site they've posted a tutorial showing you how to create a WordPress plugin using Vue.js to make interaction with the page simpler (and nicer than just a normal page reload).

It’s been a while since we’ve played with Vue JS on this blog, so why don’t we take a beginner-focused look at how one might go about building a simple polling plugin for WordPress with Vue.

Why Vue? Vue can scale up to be used for full-blown single page applications, but you can also use it to add small bits of interactivity to sites, pages, or plugins where in the past you may have used jQuery.

[...] Why a polling plugin? There are scores of polling plugins for WordPress, most of them are free, and most of them will be better than the one we’re going to build today, but there is something missing from the current offering of polling plugins: none of them are polka themed…

They start off with the PHP code required to power the plugin (a.k.a. "Pollka King") and load the required resources. They make use of a shortcode to refer to the plugin and show the structure they'd like to use in the editor to create the poll. The backend and frontend code is included along with screenshots of how it should look along the way.

tagged: tutorial wordpress plugin vue2 vuejs poll

Link: https://deliciousbrains.com/vue-2-wordpress-plugin-tutorial/

Delicious Brains:
WordPress Deployment Part 2: Deploying WordPress Using The Command Line
Jul 03, 2018 @ 09:48:59

The Delicious Brains site has posted the second part of their "deploying WordPress using the command line" series today. In part one they talked about automated deployments and why they're important (and useful). In this latest tutorial they start in on the setup of the environment and the tools you'll need to complete the deployment.

In my last article, we looked briefly at why automated deployments are important and how to prepare a WordPress site for automated deployments.

Now that our WordPress site is ready to be deployed, in this article we’re going to look at how we can use command line (CLI) tools to deploy WordPress from our local computer to a remote server. While we’re not quite at the stage of being ready to set up automated deployments just yet, understanding how we can use CLI tools to deploy WordPress will serve as a good foundation for all of the automated deployment methods we will look at later in this series.

The article then walks through the different pieces you'll need to set up including a DigitalOcean droplet as a destination and a choice of several data transfer tools:

The post also mentions the WP-CLI tool but points out that it doesn't include functionality to actually move files, only work with local ones.

tagged: wordpress deployment part2 series commandline tutorial

Link: https://deliciousbrains.com/wordpress-deployment-workflow-command-line/

RIPSTech.com:
WARNING: WordPress File Delete to Code Execution
Jun 27, 2018 @ 10:29:26

On the RIPSTech.com site they've posted a warning to the WordPress users out there about a vulnerability that would allow a malicious user to delete any file in the WordPress installation, not just file uploads.

At the time of writing no patch preventing this vulnerability is available. Any WordPress version, including the current 4.9.6 version, is susceptible to the vulnerability described in this blogpost.

For exploiting the vulnerability discussed in the following an attacker would need to gain the privileges to edit and delete media files beforehand. Thus, the vulnerability can be used to escalate privileges attained through the takeover of an account with a role as low as Author, or through the exploitation of another vulnerability/misconfiguration.

The post includes more details around the impact of the issue and where in the code the problem lies. It also offers a temporary "hotfix" as a way around the issue by adding a new filter that uses the basename function to reset the thumbnail data.

tagged: security wordpress delete file vulnerability code execution

Link: https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/

Delicious Brains:
Hosting WordPress Yourself 2018 Update
Jun 13, 2018 @ 09:33:33

The Delicious Brains site has posted an update for the last part (10 of 10) of their series providing a guide to hosting WordPress yourself for some smaller changes for doing it in 2018.

I originally started writing Hosting WordPress Yourself back in February 2015, which makes this series over three years old! During that time a lot has changed, which is why I updated the series just over 12 months ago, to keep the content relevant. Since then, even more has changed in the WordPress hosting scene, so it’s time for another update!

I have already updated the existing articles in this series with the changes that follow. This article serves as a changelog and documents what has changed in each part of this series, where I guide you through the process of building a complete server to house your WordPress sites

This update shares changes in the virtual server setup, new software releases, suggestions of server monitoring services and web server configuration changes. Each point in the list is also linked back to the other part of the series related to the changes to give more context.

tagged: wordpress hosting guide tutorial series 2018 update

Link: https://deliciousbrains.com/hosting-wordpress-yourself-2018-update/

TutsPlus.com:
What Are the WordPress PHP Coding Standards?
May 23, 2018 @ 12:51:35

On the TutsPlus.com site they've posted a tutorial sharing some of the current WordPress coding standards when it comes to both the structure and syntax of the code written in WordPress (and suggested for plugins as well).

You can find the full WordPress PHP coding standards in the tagged: wordpress coding standard tutorial example

Link: https://webdesign.tutsplus.com/tutorials/php-coding-standards--cms-31203

Delicious Brains:
WordPress Deployment Part 1: Preparing WordPress
May 09, 2018 @ 11:05:12

The Delicious Brains blog has kicked off a new series of posts walking you through the deployment of a WordPress site with automated (and repeatable) deployments.

Welcome to the first post in a workflow series on deploying WordPress. In this series, we’re going to look at how you can set up automated deployments for your WordPress site in a range of different ways.

They start off by answering the question of "why" for automated deployments. They make the point that automated deployments can help reduce the potential for human error, increase the reliability of the deployments and have many more benefits. Next they start in on the preparation work, helping you get several prerequisites set up before getting to the deployment process:

  • Setting up the site on an accessible Git repository and having plugins/dependencies managed by Composer
  • Deploying configuration files
  • Disable FTP Access & File Editing
  • Disable Auto Updates

The post also includes a section covering the deployment of the database for your application and any other media you might have related to it (images, files, etc).

tagged: wordpress deployment series part1 preparation

Link: https://deliciousbrains.com/wordpress-deployment-workflow-preparing/

Delicious Brains:
How We Create WordPress Plugins: From Idea To Release
Apr 24, 2018 @ 11:47:01

If you're a WordPress user and you've ever wondered about the process of creating your own custom plugin, this new tutorial from Delicious Brains might be just what you need. In it they go through their process for creating a plugin, from the initial ideas to release.

If you’ve been reading our blog for a while, you’ve probably seen some of our tutorials on developing plugins using different technologies like React and Vue. But when not writing examples for blog posts, we rarely if at all dive into creating a new plugin – there’s a lot more that goes into it before we write a single line of code.

In this week’s post, we’ll be taking a look at everything we do to create a new product or WordPress plugin. We don’t adhere strictly to any specific software development process, but the method we’re using currently seems to work well.

They then walk through the process, step-by-step, with a summary of each and helpful hints as you go along:

  • Research and Brainstorming
  • Wireframes
  • Developing the Plugin
  • Reviewing and Testing

The post ends with some concluding thoughts about the amount of work required, scope creep and the value of planning/wireframes.

tagged: wordpress plugin tutorial idea release process

Link: https://deliciousbrains.com/building-wordpress-plugins/