How do I speed up a WordPress website?

1% of problems we won’t talk about here. None of this advice applies to you.

98% of “I have a slow WordPress site” problems:

Cache plugins will NOT speed up your website significantly.
The number of plugins will not effect your site speed.
Putting your site on a CDN will not speed up your site.
Slow shared hosting – This has nothing to do with WordPress per se. It’s just that there are many WordPress blogs on shared hosts and they are often slow. You can run any kind of website slowly on a shared host. Some companies like GoDaddy or BlueHost can have thousands of websites running on one physical system. The interesting thing is that high speed, cloud based servers on Amazon or Google are actually cheaper than shared hosts. Of course, you have to learn how to setup a server! So this is a funny issue because it isn’t really about WordPress, it’s more about the economics of computer systems and the economics of knowledge. Anyway, if you’re a human being raising your hand saying, “My WordPress website is slow” the answer to your problem is to learn how to setup a WordPress server, or hire someone who can. Your problem is you just don’t know how to do something simple. It’s like not knowing how to put gas in your car, and not understanding why it won’t move.

Improperly uploaded or linked images

The other 1% of WordPress speed problems come from improperly adding images. When you upload to the media library, dy default WordPress rescans the image into three different sizes. If you use a properly coded theme from the free repo, your theme will serve the correct image to the user.

Solution for 98%:

Properly upload images via the media uploader.
Simply pay for faster hosting.

Question on quora.com

Is there any method to retrieve previous changes made in WordPress?

John Dee answers a question on Quora

Yes. You can restore previous changes made on “pages”. By default, WordPress has two post types. You can also have custom post types called anything [i.e. tickets, or calendars etc.]. The two default post types are “posts” and “pages”. Pages have a screen option called revisions which allow you to browse through previously saved pages. You can restore any previously saved post if you have the role “editor” or above. This feature can be enabled on any post type by a developer, and is enabled by default on pages.

Read John Dee's answer to Is there any method to retrieve previous changes made in WordPress? on Quora

Business Stakeholders: How to Describe a Software FEATURE

A feature from the biz perspective

What is a feature?
A feature is an aspect of software that is useful. Anything you can express, that is possible, and that you can afford, can be a feature. A bug is an aspect of software that isn’t useful.

Since we’re talking about development, we’re discussing software features that don’t exist yet. These are features that we would like to build, or existing features that we would like to make better. Describe a feature with should statements:

  • It should email all the clients once a month.
  • The client should have a setting page in the admin area.
  • The plugin should have a custom post type called GPS coordinates for each subscriber.
  • The div should show a timeline of Civil War battles in the footer area.

The next statement you should create is the reason for the feature you are requesting. What is the business value of this feature? Describe the reason by using a “Because”, or “So that”  or “In or that”

  • So that the clients are routinely updated.
  • In order that the user can change the settings.
  • Because we need to store the GPS data.

Alternatively, you can use Gherkin syntax for feature development.

How to find the best possible WordPress plugins

How to find the best WordPress plugins

Post this template as a guaranteed contest on upwork.com or freelancer.com for $40.

******** Recommend and install a WordPress plugin *********

I want to install a WordPress plugin, but I’m not sure exactly which one I should use.

Give me a very brief overview of what WordPress plugin(s) I should use, how much it will cost me (if anything), and what functionality it has. I’m not looking for a comprehensive overview of WordPress plugins, I’m looking for a specific plugin and someone who can execute installing it. You don’t need to submit credentials or previous projects, just know how to use the plugin you recommend and be able to install and set up the functionality.

Submit a simple text entry describing what plugin I should use, and you’re contact information. I will provide you with access. This is a guaranteed contest.

Functionality I need:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The Toolkit for WordPress BDD


To do Behavior Driven Development [BDD] in WordPress, you need to get the tools! Here is the stack you should use:

Operating System

Ubuntu 16 LTS. I personally use an Ubuntu 17 development server on my laptop. You can run Ubuntu on most machines with a USB memory stick, and it’s free. I use Ubuntu on the Amzaon AWS remote cloud servers and production servers. Ubuntu is a brand, but it’s just a Debian based Linux distro, so it’s future proof. If you stopped liking Ubuntu, you could switch to another distro without hassel.
You can also use Mac or Windows.

Get the stack

Once you have a machine with Ubuntu running, you can load the entire development stack by running a single command:
source <(curl -s https://raw.githubusercontent.com/johndeebdd/Remote-BDD-Setup/master/installScripts/wordpress.sh)
Directions

Test Framework

Codeception with WordPress modules - PHPunit is the standard and default library for doing unit testing in PHP. CodeCeption INCLUDES PHPunit, as well as a whole series of libraries for doing BDD.

Acceptance testing

You should use the WPWebDriver and WPDb modules. You can use Selenium to drive a full browser if you want, but generally you should use PhantomJS, because it is much faster. You can write your test in the Gherkin format, or in procedural PHP. Generally, I consider Gherkin cumbersome and not worth the candle.
Sample acceptance.yml

WP-Unit testing

You should use the WPloader and WPQueries modules.
Sample unit.yml

Where does code live?

Use a Git repo. Use Github for code that has a public face. Use Bitbucket for private repos [or pay Github for a private repo, either way].

How do you control outsourcer Git commit access?

First setup a few emails: freelancer1@yourdomain.com, freelancer2@yourdomain.com etc. These accounts are granted direct commit access to the repo. Give the outsourcer access to the email account. The repo itself can set a webhook to pull to the production server upon commit. When you want to freeze the outsourcer from the project, you just change the password on Github and email accounts. The project manager retains access to pull to production. The outsourcer can make a commit and it appears directly on the development server. When the commit is approved by the project manager, he does a manual pull to the production machine.

How does the outsourcer work on the code?

Some programmers will have their own IDE setups that they like and know how to use. Eclipse is the best free IDE, while PHPStorm is probably the best commercial IDE. If they know how to pull down from Github and run the code on a local host, great. If they don't know how to do that, setup a development server in the cloud for them. Our stack include the Codiad IDE, which is an open source IDE similar to PHPStorm. TO access it, just go to /codiad/ on your development server, it's all setup already.

How do you run the test suite?

cd /var/www/html/wp-content/plugins/{project dir}
bin/codecept run -vvv --html

How do I see the test results?

They appear in the terminal, or at http://yourdomain.com/wp-content/plugins/{project dir}/tests/_output/
Usually in the terminal you can use the up arrow shortcut.

How do I commit to the repo?

git add --all
git commit -m "some kind of message!"
git push origin master

How do I log in to the WordPress site?

You can log in by using the FastRegister plugin. Just enter an email in the sidebar form and viola! You're logged in as an admin.

How do I log in to a terminal?

The stack will preconfigured a user called "freelancer" with a password "password". Just SSH into the system without a pem file.

Roles in WordPress development

First of all, the word roles, has several meanings. This article refers to social roles human beings play in relation to one another during development.
On a WordPress site, there is a technical concept known as user roles and capabilities. The default ones are subscriber, contributor, editor, and administrator. This article isn’t referring to that use of the word roles.
Roles can be played by the same person, but usually aren’t in direct relation to the size of the project and organization.

  • business stakeholder – [aka the client, the product owner, the guy with the money] – This person wants software. It is from him the requirements flow, and hopefully the money.
  • project manager – [aka “Jobs”] Sharing financial awareness, and responsibility to a budget with the business stakeholder, the PM has overall responsibility for the project, usually including the ability to hire and fire people. This expert can, and must, throttle the efficiency of the project, and therefore should be paid in equity or a salary, not hourly.
  • developer – [aka “Woz”] the developer is a senior programmer. This person must have a global perspective of the project or at least on a major unit of the project. He can be paid a salary or hourly. Rates run from $20 – $150 hr based on experience.
  • architect – [QA architect, senior developer] This person sets up the development environment in conjunction with the PM and the developer. John Dee is an expert in WordPress plugin development architecture and can help you set up yours!
  • programmer – this junior to the developer writes code. He can be “front end” [javascript] or “back end” [PHP] or both. It is appropriate to pay a programmer hourly, or per project. Rates are from, gratis to $25 hr.
  • designer – In WordPress, a “designer” is a person who can modify themes. He can either be skilled at using a graphic page builder, or WYSIWYG editor, or they may know CSS and HTML. You should not employ a designer who cannot produce clean CSS and HTML code. Settings jockeys – designers who don’t know how to hard code things – should never be used. Rates are from about $7/hr to $20/hr