“You should use a persistent object cache”

Actually, no, you probably shouldn’t; or more to the point, you probably don’t need to.

Since WordPress v6.1 the “Dashboard – Tools – Site Health” check has started recommending that some sites should be using a “Persistent Object Cache” without actually explaining why.

So let’s unpack that. First of all …

What is a persistent object cache?

The Health Check panel answers that as follows …

A persistent object cache makes your site’s database more efficient, resulting in faster load times because WordPress can retrieve your site’s content and settings much more quickly.

… which is great but …

Can you actually use a persistent object cache on your website?

Probably not. Reading on from wordpress.org

For your site to use persistent object caching, your hosting provider must offer you a particular type of server, a cache server. Popular cache servers are Redis and Memcached.

So are you stuck with this warning? Actually no! In most cases, when you find out the actual cause behind the warning, you’ll soon find out how to stop it appearing!

What is causing “You should use a persistent object cache” to appear?

The WordPress Health check takes a look at your database and brings up this warning if …

  1. You have more than 500 options set to autoload or more than 1,000 options in total in the wp_options table
  2. You have more than 100,000 bytes (100Kb) of options in the wp_options table
  3. You have more than 1,000 comments in the wp_comments table
  4. You have more than 1,000 posts in wp_posts table
  5. You have more than 1,000 terms in wp_terms table
  6. You have more than 1,000 users in wp_users table

Chances are if you have more than 1,000 comments, terms or users then you have a large site that probably does indeed require a persistent object cache but more often than not, the wp_options and wp_posts tables are the cause and can be reduced; and here’s how we do it …

How can I reduce the number of rows in the wp_posts table?

One very quick way is to delete all the post revisions. By default, WordPress will save all the changes you make to a post or page each time you update as revisions. Each revision is saved in the wp_posts table with the post_type set to “revision”. It’s not uncommon for a fairly small site to have hundreds of these stored in the database!

Our sister company, Webd Ltd, have developed a WordPress Maintenance plugin that will detect and allow you to easily delete these revision.

It will even let you choose how many of the latest revisions you’d like to keep site-wide and will delete the rest on a daily schedule.

How can I reduce the number and size of options in the wp_options table?

Reducing the number of options in the wp_options table is not so straight forward but by no means impossible! The afore-mentioned WordPress Maintenance plugin developed by our sister company, Webd Ltd, has gone some way to help with this.

If it detects that you have more than 500 autoload options or more than 100,000 bytes of options, it will start analysing your sites use of options; remembering all the options that your website is actually using.

After a short period of time, it will be able to fairly accurately report not only which options aren’t being used but also which of these are the top 10 largest!

You can then click the search icon next to each option which will take you to Google to see what is responsible for creating it. If it’s been left by a plugin you no longer use (which is very likely) then you can click the trashcan icon to delete it!

Soon enough you’ll have reduced the wp_options table sufficiently to prevent the warning in the Site Health tool!

And, as an added bonus, having fewer posts in the wp_posts table and fewer options in the wp_options table will almost certainly have a profound benefit on your website’s speed.

One final word of warning … always take a full backup of your database and filesystem before undertaking any work like this on your site!

I still need a persistent object cache … what now?

Some large websites do actually need a persistent object cache. If you want us to help you set one up, contact us. We’ve successfully setup Redis persistent object cache for several of our clients and doing so can have some decent results shaving time from your page loads.

Holiday Cottage Booking System

Running a business that involves rentals or bookings can be a tricky affair, especially when it comes to managing bookings and payments. Fortunately, there are many online booking systems and plugins that can help to make the process easier and more efficient. Recently, we had the pleasure of working with The Salty Shepherd, who were looking to simplify their booking process and reduce costs associated with their existing booking engine.

Our solution was to integrate the client’s website with the WP Booking System, a powerful and user-friendly booking plugin designed specifically for WordPress. The plugin offers a range of features that make managing bookings a breeze, including the ability to create custom booking forms, set pricing rules, and accept payments via Stripe.

The Salty Shepherd was particularly impressed with the plugin’s integration with Stripe, a popular payment gateway that allows for secure and reliable online transactions. By using Stripe, the client was able to process payments quickly and easily, without having to worry about issues such as chargebacks or fraudulent transactions.

Another major benefit of the WP Booking System is its ease of use. The plugin’s user-friendly interface makes it easy for clients to book reservations, while the back-end management system allows for easy tracking and management of bookings. This helped to reduce the time taken by the client to manage their bookings, freeing up more time to focus on growing their business.

We would also like to give a shoutout to the excellent support team at Veribo (specifically Roland), who helped us to resolve any issues or questions that we had while integrating the plugin with our client’s website. Their quick and efficient support was greatly appreciated, and helped to ensure that the project was completed smoothly and on time.

In conclusion, if you are looking for a reliable, user-friendly, and cost-effective booking system for your business, we highly recommend the WP Booking System. Whether you are managing holiday rentals, hotel rooms, or any other type of booking, this plugin offers the features and functionality you need to streamline your booking process and grow your business.

The Importance of PHP Compatibility Testing

In the world of web development, keeping up with the latest versions of programming languages and frameworks is essential for staying secure and ensuring optimal performance. However, updating to newer versions can sometimes cause issues with existing websites, especially if they were not developed or tested with the latest technology in mind. This was the case for South East Kayaking, who experienced problems when their host automatically upgraded their version of PHP to version 8.0.

One.com, the web hosting company for South East Kayaking, automatically updates PHP before the live version reaches its “End of Life” phase. This is a good practice, as older versions of PHP may have security vulnerabilities that could be exploited by hackers. However, it’s important to note that updating to a new version of PHP can sometimes cause compatibility issues with existing websites.

When South East Kayaking upgraded to PHP version 8.0, their website broke because it had not been developed or tested for that particular version. This is not an uncommon issue, as many websites may have custom code or plugins that were not designed with the latest PHP version in mind. It’s therefore important to thoroughly test websites after upgrading to a new version of PHP to ensure they work correctly.

Our team at Webtec Design was able to help South East Kayaking by going through their entire site and resolving any PHP errors that were causing issues. This allowed their website to continue functioning on PHP version 8.0 without any problems. However, it’s worth noting that this process can be time-consuming and may require significant development resources, depending on the complexity of the website.

It’s also important to note that even if a website is compatible with a new version of PHP, it may not be compatible with other technologies or platforms that it relies on. For example, while PHP version 8.0 is supported by One.com, WordPress (which South East Kayaking’s website uses) is still in beta support for this version of PHP. This means that while upgrading to PHP version 8.0 may be a good idea for security and performance reasons, it’s important to carefully consider any potential compatibility issues before doing so.

In conclusion, keeping up with the latest versions of programming languages and frameworks is essential for website security and performance. However, it’s important to carefully test websites after upgrading to a new version of PHP to ensure they work correctly. This can be a time-consuming process, but it’s necessary for avoiding compatibility issues and ensuring a smooth transition to the latest technology.

Sussex Green Energy: A Solar-Powered Website

Sussex Green Energy is a new company based in Hastings that specializes in installing solar PV systems and electric vehicle chargers. They needed a website that would reflect their commitment to sustainability and showcase their services to potential customers. That’s where we came in – we designed a beautiful, functional website using Elementor and the “Hello Elementor” theme.

Elementor is a drag-and-drop page builder for WordPress that allows the client to make changes to their site without needing to write any code. It’s an incredibly versatile tool that enables us to create a website that is both visually appealing and functional.

The “Hello Elementor” theme is a lightweight, minimalist theme that is perfect for use with Elementor. It provides a solid foundation for any website built with Elementor. We used this theme as the basis for Sussex Green Energy’s website and customized it to fit their brand and style.

Retro-Fit Stripe Payment Gateway

As technology advances, it’s important for businesses to keep up with the times. That’s why we were thrilled to work with CharitySaver to update their website and payment gateway.

CharitySaver’s website was originally developed with WordPress as the backend by a third party developer. While WordPress is a great platform, they noticed that the existing payment gateway, Worldpay, was not the most cost-effective option for their clients. That’s why they decided to switch to Stripe, which offers lower fees for businesses of all sizes.

To make the transition as seamless as possible, we replaced the existing custom payment gateway with Stripe. This allowed CharitySaver to save money and streamline their payment process, all while ensuring that their customers could easily make donations.

In addition to the payment gateway update, we also needed to redevelop the bespoke payment system for single and recurring donations. This system allows CharitySaver’s customers to easily donate to their favorite charities, either as a one-time donation or a recurring donation.

At the heart of the new system is Stripe’s powerful API. This allows CharitySaver to process payments securely and efficiently, while also providing customers with a seamless experience. With Stripe, customers can donate with confidence, knowing that their personal and financial information is protected.

Overall, we’re thrilled with the work we’ve done for CharitySaver. By updating their website and payment gateway, we’ve helped them save money, streamline their payment process, and provide a better experience for their customers. If you’re looking to update your own website or payment gateway, don’t hesitate to reach out to us!

Parish Council Web Design

When we were approached by Hawkhurst Parish Council to redevelop their website, we knew we had to take a holistic approach to ensure the site met the highest standards of user privacy and experience. In this article, we’ll share some technical details about how we accomplished these goals.

One of the first things we did was to make sure that the site no longer requested files from third-party servers. This is important because when a website requests files from third-party servers, it can compromise the privacy of the site’s visitors. Third-party servers can track user behavior across multiple sites, which can be concerning for users who value their privacy. By removing these requests, we were able to ensure that the site is a safe and secure space for users to browse.

Another important aspect of user privacy is cookies. Cookies are small text files that are stored on a user’s computer when they visit a website. They can be used to track user behavior and preferences, but they can also be a privacy concern. We made sure that the site doesn’t drop any cookies on a visitor’s browser, which means that a cookie banner is not required. This is good news for users who are tired of seeing cookie banners everywhere they go on the web.

In addition to these privacy measures, we also focused on making the site fast to load. This is important for both the user experience and search engine optimization. Websites that load quickly are more likely to retain visitors, which can lead to higher engagement and conversions. Additionally, search engines like Google use site speed as a ranking factor, so a fast site can lead to improved visibility in search results.

To accomplish this, we used the latest default Twenty Twenty-Three WordPress theme, which is tagged as “Accessibility Ready”. This theme is designed with accessibility and speed in mind, which means that users with disabilities can access the site easily, and it loads quickly for everyone.

In conclusion, when developing a website, it’s important to consider not only the design and functionality but also user privacy and experience. By taking a holistic approach to website development, we were able to create a safe, secure, and fast website for Hawkhurst Parish Council that meets the highest standards of user privacy and experience.

Bed and Breakfast Website

We setup this website for a bed and breakfast near the Pantiles in Royal Tunbridge Wells. We used the new WordPress default Twenty Twenty-Two theme which uses WordPress’ new Full Screen Editor.

Admin Only Payment Gateway

We’ve developed a WordPress plugin that allows you to disable a WooCommerce payment gateway (if active) for all users except Administrators.

This allows you to test a payment gateway on a live site without letting the general public see it first.

If you are interested in the plugin, let us know!

Counselling Website

We setup this website for a counsellor in Pett Level, East Sussex using WordPress default Twenty Twenty-One theme and our sister company’s Options for Twenty Twenty-One plugin.

Custom WordPress: Debug, Secure & Patch

Each year we think we’ve seen it all then we’re shown another WordPress site with even more crazy security issues. Some are so bad that it’s a wonder how the sites have lasted so long without being hacked!

Almost always the site owners are blissfully unaware of their predicament and … often have been enticed into using terrible developers with cheap quotes but some had paid through the nose for their site to be sub-contracted without their knowledge!

Here are some examples of things we have found recently … !

  • Insecure AJAX Functions
    AJAX functions are segments of PHP that are called via JavaScript from the web browser to perform some request on the server in the background without the page being reloaded. With WordPress these can be setup using the “wp_ajax_” or “wp_ajax_nopriv_” hooks. The former is only allowed to run if a user is signed in, the latter works only if a user is not signed in. Often developers don’t seem to know the difference and use both … allowing functions to be run (in theory) without needing to be logged in!
  • No Nonce on Forms
    A Nonce (Number Used Once) is a unique identity generated by the server at the time a form is served that is then checked when the form data is received to make sure that the form has been completed by a human and the data has not been just fired at the server by a bot. The use of a nonce shouldn’t be relied on as a security measure as they can been found in the website’s source code but they are a good way to reduce automated bot activity on your site and should always be used. Not using a nonce leaves your site wide open to cross-site scripting attacks.
  • No Capability Checking on AJAX Functions
    It’s not enough to consider AJAX functions secure just because they used a Nonce and the function is set to only run for logged in users. The function should also check that the user has the correct capability, for example with the current_user_can(‘manage_options’) function which checks that the user is allowed to edit the site’s options. No capability checking potentially allows users to do things that they shouldn’t be able to.
  • No Data Sanitisation
    This is an important one and almost always done incorrectly, if at all! We often see site’s only checking the data using the sanitize_text_field() function which is a generic function that will only filter the data so much. It’s really important to make sure that a relevant sanitisation function is used depending on what the data is. For example if a data field should only contain an email address then sanitize_email() should be used. Lack of data sanitisation leaves your site prone to SQL injection or other attacks.
  • No SQL Preparation
    WordPress has a really cool method built into their database class wpdb::prepare() which allows developers to make sure that the user’s data is handled correctly (and securely) before it’s sent to the database. But guess what … it’s rarely used and leaves your site wide open to an SQL injection attack!

Child Theme Removal from Gallery Website

We were asked to look at setting up a new website for a client who wanted something similar to their existing gallery site and suggested that one could be replicated.

They also liked the idea of speeding the site up by removing the child theme and they liked our price so we set to work!

The child theme JavaScript, imagery and CSS were relocated to a custom plugin. All template customisations were identified and re-developed, placing the code in the custom plugin.

The speed increase of the resulting site was so dramatic that the client decided to undertake the same work to the original gallery website!

Replace Premium Theme with a Default WordPress Theme

We were contacted by our friends over at Star Fish Creative to see if we could help one of their clients, Rentrifone, with their WordPress website.

Their site had been developed (as so many are) with a bulky “premium” theme which was seriously impacting on the speed at which the pages loaded.

We took a look and quickly came to the opinion that there really wasn’t anything too complicated about either the design or functionality of the site and quoted to replace the existing theme with the default Twenty Twenty-One theme (free) and our sister company’s Options for Twenty Twenty-One plugin (which is also free if you don’t use the premium plugin but only £19.99 if you do!).

The resulting site is rapid compared to the original site and they have the peace of mind knowing that the theme will be supported by WordPress for many years to come!