Kinsta® https://kinsta.com/ Fast, secure, premium hosting solutions Mon, 10 Feb 2025 13:53:03 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.7 https://kinsta.com/wp-content/uploads/2024/09/cropped-Kinsta-black-favicon-1-32x32.png Kinsta® https://kinsta.com/ 32 32 How to add an add-to-cart button to your WooCommerce store https://kinsta.com/blog/add-to-cart-button-woocommerce/ https://kinsta.com/blog/add-to-cart-button-woocommerce/#respond Thu, 13 Feb 2025 15:10:40 +0000 https://kinsta.com/?p=189978 If you’re running a WooCommerce store, the add-to-cart button is one of your most powerful tools for driving conversions. It’s the bridge between customer browsing and ...

The post How to add an add-to-cart button to your WooCommerce store appeared first on Kinsta®.

]]>
If you’re running a WooCommerce store, the add-to-cart button is one of your most powerful tools for driving conversions. It’s the bridge between customer browsing and purchases. A well-placed, fully functional add-to-cart button makes the shopping experience smoother and increases the likelihood of sales.

But what happens when this critical button goes missing or doesn’t behave as expected? Many store owners run into common issues, like the “Add to Cart button not showing” error, or they want to customize the button for a more branded experience.

This article is your comprehensive guide to adding, customizing, and troubleshooting the add-to-cart button in WooCommerce. Whether you’re a developer looking for full control, a store owner seeking an easy solution, or someone troubleshooting errors, these are practical steps to get the job done efficiently. Let’s get to it!

The WooCommerce add-to-cart button: a quick primer

The add-to-cart button in WooCommerce is an important way for people to interact with your shop. By default, it allows customers to select products and add them to their shopping carts.

Here’s a quick overview of where you typically find this button:

  • Product pages: Appears alongside product details like title, price, and description.
  • Shop pages: Displays directly under each product, letting customers add items without visiting individual product pages.
  • Category pages: Similar to shop pages, it streamlines the buying process for multiple products across a specific store category.

While WooCommerce provides a default add-to-cart button that works for most stores, there are scenarios where you might need to make changes. For instance, you might want to customize the button to match your brand’s design, its language, or to add some additional functionality. Or, you might need to fix something. If the button is missing, broken, or not behaving correctly due to theme compatibility issues, plugin conflicts, or outdated WooCommerce settings, some troubleshooting may be in order.

In the following sections, we explore different methods to add, customize, and fix the add-to-cart button so your WooCommerce store performs at its best.

Methods to add an add-to-cart button

There are three primary methods for adding an add-to-cart button to your WooCommerce store. Not every method is suited to every skill level, so read these descriptions, weigh their pros and cons, then take the approach that makes the most sense for you.

  • Using shortcodes: This is a simple, code-free method ideal for beginners. Shortcodes allow you to quickly add buttons to pages or posts, but the customization options can be somewhat limited.
  • Editing theme files: For those who need greater control and are comfortable with coding, editing theme files (like functions.php) lets you add and customize the button exactly as you want. However, this approach requires caution and technical knowledge, as mistakes can affect your entire site.
  • Using plugins: Plugins are a user-friendly option that simplifies the process of adding and customizing add-to-cart buttons. While this method is quick and accessible, poorly chosen plugins sometimes cause conflicts, slow down site performance, or require frequent updates.

Let’s walk you through each approach, starting with how to use shortcodes to add an add-to-cart button.

Using shortcodes

Shortcodes are one of the simplest and most accessible ways to add an add-to-cart button in WooCommerce. A shortcode is a small piece of code enclosed in brackets like this: [shortcode]. WooCommerce then interprets this shortcode to display a specific feature on your site.

To add an add-to-cart button using a shortcode, you can use the following syntax: [add_to_cart id="PRODUCT_ID"]

Here, PRODUCT_ID is the unique ID of the product you want to link to. To find the product ID, go to Products > All Products in your WordPress dashboard. Hover over the product you want to add, and the product ID will appear under the product name like this: ID: 123.

product id
Locating the product ID within the Products view in WooCommerce.

You’ll then need to insert the shortcode into a page or post. To do this, open the page or post where you want to display the button. Then add a Shortcode block (if using the WordPress block editor) or paste the shortcode directly into the content area.

add to cart shortcode
Inserting an add-to-cart button using the shortcode block.

Replace PRODUCT_ID with the correct product ID, then Save or update the page or post. When previewing the page, you’ll see the button has been added, along with the item’s price:

add to cart preview
What a shortcode-inserted add to cart button looks like on a live site.

By default, the button will adopt your theme’s styles.

Editing theme files (custom option)

For store owners or developers looking for full control, editing theme files is an excellent way to add and customize the add-to-cart button. This method requires coding knowledge and caution, but it offers endless possibilities for customization.

This approach allows you to modify button placement, style, and functionality exactly as needed. It also reduces reliance on third-party plugins, which can always improve site performance.

To add the add-to-cart button by editing your theme’s files, you’ll first need to create a child theme. Before editing any theme files, it’s essential to use a child theme to ensure your changes aren’t lost during theme updates.

The rest of these instructions are to be carried out within the child theme only.

The file you’ll edit depends on where you want the button to appear. Common files include:

  • single-product.php (for product pages)
  • functions.php (for global functionality)

Once you find the right file within your child theme, add the following PHP snippet to the desired location in your theme file:echo do_shortcode('[add_to_cart id="PRODUCT_ID"]');

Replace PRODUCT_ID with the actual product ID.

Then, save your changes and upload the updated file. Visit your store to ensure the button appears and functions as expected.

Using plugins

If you prefer a no-code solution, plugins are a quick and reliable way to add and customize the add-to-cart button without coding knowledge.

Here are some trusted plugins that can help you manage and customize the WooCommerce add-to-cart button:

YITH WooCommerce Product Add-Ons

yith product add-ons
YITH WooCommerce Product Add-Ons plugin.

The YITH WooCommerce Product Add-Ons plugin allows you to enhance your products by offering additional options and customizations directly on the product page. Whether it’s gift wrapping, personalization fields, or extra services, this plugin makes providing a custom shopping experience easier. Customers can select add-ons during the purchase process, improving their satisfaction and increasing your store’s average order value.

Key features

  • Add unlimited extra options to products, including checkboxes, dropdowns, text fields, and more.
  • Charge additional fees for selected add-ons to boost revenue.
  • Offer conditional logic to display options based on customer selections.
  • Fully compatible with variable products and WooCommerce themes.

WooCommerce Custom Add to Cart Button

woocommerce custom add to cart
WooCommerce Custom Add to Cart Button plugin.

The Woo Custom Add to Cart Button plugin lets you personalize how your WooCommerce add-to-cart buttons work. It gives you full control over button text, colors, styles, and placement so they’ll match your store’s branding perfectly. The plugin also supports advanced features like custom URLs, so you can redirect customers to specific pages, like checkout or custom landing pages, after clicking the button.

Key features

  • Customize the add-to-cart button text, style, and placement.
  • Set custom redirect URLs for enhanced checkout flows.
  • Easily apply changes without touching code, making it beginner-friendly.
  • Lightweight and compatible with most WooCommerce themes.

WPC AJAX Add to Cart

wpc ajax
WPC AJAX Add to Cart plugin.

The WPC AJAX Add to Cart plugin enhances your WooCommerce store by allowing customers to add products to their cart without refreshing the page. This AJAX functionality improves the shopping experience, making it faster and more user-friendly. The plugin supports a variety of product types, including simple, variable, and grouped products. It also integrates with most WooCommerce themes and plugins.

Key features

  • AJAX-powered add-to-cart functionality for a smoother user experience.
  • Flexible support for different product types, including variable and grouped products.
  • Compatibility with popular WooCommerce themes and extensions.
  • Lightweight design to ensure your store remains fast and responsive.

Common issues and how to fix them

Even with WooCommerce’s built-in features, the add-to-cart button can sometimes look strange, behave incorrectly, or fail to display altogether. This disrupts your store’s performance and frustrates customers. Below, we address the most common issues and provide step-by-step solutions to resolve them.

Add-to-cart button not showing

If the add-to-cart button is missing, it’s often due to:

  • Theme compatibility issues
  • Plugin conflicts
  • Outdated WooCommerce versions
  • Incorrect product settings

To fix this, check your WooCommerce settings first. Go to WooCommerce > Settings > Products and ensure that the Enable AJAX add to cart buttons option is checked.

enable ajax checkbox
Verify the Enable AJAX add to cart buttons checkbox is ticked.

Next, verify the product type. Some product types, like external or affiliate products, may not display an add-to-cart button. To fix this, go to Products > All Products in your dashboard.

Then, edit the product and ensure it’s set to Simple Product or Variable Product in the Product Data section.

product type
Check the product type to verify it’s correct.

If this doesn’t fix the issue, test for plugin conflicts. Deactivate all plugins except WooCommerce then visit your store to see if the add-to-cart button reappears. If it does, reactivate plugins one by one, refreshing the site each time to identify the conflicting plugin.

To continue troubleshooting, temporarily switch to a default theme like Storefront or Twenty Twenty-Four. If the button works with the default theme, the issue lies within your active theme. You may need to contact the theme developer for support.

You can also check that WooCommerce and WordPress are up-to-date. Go to Dashboard > Updates and ensure WooCommerce, WordPress, and all plugins are up to date. Outdated versions can cause errors and performance issues.

If you’re still having issues, enable debugging. To do this, go to WooCommerce > Status > Logs and look for error messages. A tool like the Query Monitor plugin can help identify PHP errors or conflicts.

Query Monitor plugin.
Query Monitor plugin.

Add-to-cart button not functioning

Sometimes, the button may appear but fails to add products to the cart. This can happen due to things like JavaScript errors or caching issues.

To begin, check for JavaScript errors. Open your store in a browser and press F12 to open the developer tools or Cmd + Option + I on Mac. Go to the Console tab and check for red error messages.

If errors appear, they may be caused by conflicting scripts from a theme or plugin.

If you use a caching plugin, clear the cache and test again. Clear your browser cache or test the site in an incognito window.

Duplicate add-to-cart buttons

Sometimes, you may see multiple add-to-cart buttons on product pages, which can confuse customers.

This is often caused by theme templates or customizations. To fix this, check for duplicate do_action(‘woocommerce_after_add_to_cart_button’) hooks in your theme’s single-product.php file. Then remove the duplicate hooks and save changes.

How to customize the WooCommerce add-to-cart button

Customizing the add-to-cart button improves user experience and helps it to better match your store’s branding. Whether you want to change the text, style, or functionality, WooCommerce makes it possible with some tweaks to your theme files or CSS. Remember to use a child theme to make these changes and to always back up your site before moving forward.

Change the button text

By default, WooCommerce uses “Add to Cart” as the button text. If you want to replace it with something like “Buy Now” or “Add to Bag,” you can do this with a simple code snippet.

Add the following code to your child theme’s functions.php file:

function customize_add_to_cart_text( $text ) {  
    return __( 'Buy Now', 'woocommerce' );  
}  
add_filter( 'woocommerce_product_add_to_cart_text', 'customize_add_to_cart_text' );

Replace Buy Now with your preferred text.

Save the file and refresh your store to see the updated button text.

Change the button style

To better match your branding, modify the button’s appearance, including colors, fonts, and sizes, using custom CSS.

Here’s an example of CSS to customize the add-to-cart button:

.button.single_add_to_cart_button {  
    background-color: #ff6600;  
    color: #ffffff;  
    font-size: 18px;  
    padding: 12px 24px;  
    border-radius: 8px;  
    text-transform: uppercase;  
}  

.button.single_add_to_cart_button:hover {  
    background-color: #e65c00;  
    color: #ffffff;  
}

To apply this CSS, go to Appearance > Customize > Additional CSS in your WordPress dashboard. Paste in the code above and click Publish to save changes.

additional css
Add custom CSS to change the style of your add-to-cart button.

Redirect users after clicking the button

Clicking the add-to-cart button usually keeps customers on the same page. If you want to redirect users to a specific page — like the cart or checkout page — add the following snippet from GitHub to your functions.php file:

function redirect_after_add_to_cart() {  
    global $woocommerce;  
    $checkout_url = wc_get_checkout_url();  
    return $checkout_url;  
}  
add_filter( 'woocommerce_add_to_cart_redirect', 'redirect_after_add_to_cart' );

This example redirects users to the checkout page.

Replace $checkout_url with any other page URL if needed (the cart page, for example).

Summary

The WooCommerce add-to-cart button plays a significant role in creating a smooth shopping experience and driving conversions. Throughout this guide, we’ve explored various methods for adding, customizing, and troubleshooting the button effectively.

You can use shortcodes for simplicity, edit theme files for complete control, or rely on plugins for a no-code solution. We also included a primer on how to resolve common issues and add some customization to build a solid user experience right from the start.

Want your store to perform well from top to bottom? Consider Kinsta’s Managed Hosting for WordPress. Features like staging environments, automated backups, and top-tier security mean your site runs smoothly while you get to focus on growing your store and delivering excellent products. What’s better than that?

The post How to add an add-to-cart button to your WooCommerce store appeared first on Kinsta®.

]]>
https://kinsta.com/blog/add-to-cart-button-woocommerce/feed/ 0
Kinsta’s Year in Review — the best of 2024 https://kinsta.com/blog/2024-year-in-review/ https://kinsta.com/blog/2024-year-in-review/#respond Wed, 12 Feb 2025 10:00:25 +0000 https://kinsta.com/?p=191060&preview=true&preview_id=191060 2024 has come and gone, leaving behind countless memorable stories and achievements. While every year brings its own set of challenges and milestones, 2024 has stood ...

The post Kinsta’s Year in Review — the best of 2024 appeared first on Kinsta®.

]]>
2024 has come and gone, leaving behind countless memorable stories and achievements. While every year brings its own set of challenges and milestones, 2024 has stood out as a year of growth and innovation for us at Kinsta — and for many of our customers around the globe.

This article highlights the achievements, innovations, and progress that made 2024 an unforgettable year for Kinsta.

First and foremost, we want to express our heartfelt gratitude to our amazing customers. Whether you run a single website, a WooCommerce store, an agency, an academic institution, or any other venture, thank you for trusting Kinsta to host your websites — the cornerstone of your business.

We also want to give a big shout-out to our readers, followers, and community. In 2024, we published hundreds of tutorials, connected with new audiences, and deepened our engagement with you all. Your feedback, ideas, and passion inspire us to keep pushing forward.

We’d like to thank our wonderful affiliate community, which has over 11,000 members; your role in spreading the word about Kinsta and helping us drive the web forward over the past year has been essential for our growth. We appreciate your commitment and hard work!

And, of course, none of this would be possible without our amazing Kinsta team. From our brilliant Engineering and Support heroes to our Sales, Product, and Marketing stars and everyone working behind the scenes — thank you for your dedication to Kinsta. You’ve truly shaped it into what it is today, and we couldn’t be here without you. 🥰

Now, with gratitude in our hearts, let’s jump into a selection of highlights, stats, and stories that made 2024 a year for the books. Are you ready? Let’s dive in!

Customer base and revenue growth

Our customer base and revenue continued growing at a healthy rate compared to the previous year, as represented in the charts below. Kinsta remains a financially stable and trustworthy company!

Revenue growth through 2024.
Revenue growth through 2024.

We are proud to empower over 120,000 businesses globally. Over the past year, our customers launched more than 39,000 new sites on our platform, reflecting an impressive 46.26% growth in customer base.

Customer base growth through 2024.
Customer base growth through 2024.

According to Nathan Bliss, Kinsta’s Chief Sales Officer:

I’m incredibly proud of the growth and success Kinsta has achieved this year. Our strong customer base and revenue growth are a testament to the hard work of our entire team and the loyalty of our customers. We’re committed to providing the best possible hosting experience for our customers, and I’m confident that we’ll continue to exceed expectations in the years to come.

I’d also like to personally thank our Sales team for their dedication and hard work in driving new customer acquisition and ensuring customer satisfaction. Their contributions have been instrumental in our success this year.

Looking ahead to 2025, I’m excited to see how we can continue to innovate and provide even more value to our customers. We have some exciting plans in store, so stay tuned!

Data volume handled by Kinsta in 2024

As Kinsta continued to grow in 2024, so did the sheer scale of data we managed across our infrastructure. From billions of HTTP requests to petabytes of cached and delivered data, here’s a closer look at the impressive numbers that showcase the power and reliability of our platform:

  • 80+ billion HTTP requests were served through Kinsta’s servers.
  • 3.6+ petabytes of data served by Kinsta’s servers.
  • 48+ billion HTTP requests served through the Kinsta CDN.
  • 2.43 petabytes of cached data served via the Kinsta CDN.

PHP versions, WordPress versions, and most common plugins for Kinsta users in 2024

Get ready for some juicy data! The following sections provide a snapshot of the PHP versions powering sites hosted on Kinsta, the WordPress versions they use, and the plugins our customers love the most.

Supported and most used PHP versions

We recently released support for PHP 8.4 on all environments. We encourage our customers to test upgrades on their staging sites to experience the performance and security benefits firsthand. Once they are happy with the upgrade, they can safely deploy it to production.

In November 2024, Kinsta released long-term support (LTS) and security monitoring for PHP end-of-life (EOL) versions 7.4 and 8.0, providing flexibility for businesses with legacy applications. With this new option available, customers using older versions of PHP (who could not upgrade for numerous reasons) could bring their site to Kinsta and enjoy the wide range of features we proudly offer.

The PHP versions supported by Kinsta and most commonly used by our customers were distributed as follows (considering that PHP 8.4, 8.0, and 7.4 were introduced in MyKinsta late in 2024):

  • 78.8% used PHP 8.1
  • 11.2% used PHP 8.3
  • 9.3% used PHP 8.2
  • 0.4% used PHP 8.4
  • 0.3% used PHP 7.4
  • 0.01% used PHP 8.0

Most used WordPress versions

Unlike PHP, most of our users keep WordPress up to date. WordPress version 6.7 is by far the most popular, followed by WordPress 6.6 and WordPress 6.5. For detailed insights on each version and their changes, check out our linked articles.

Most used WordPress versions among Kinsta users in 2024.
Most used WordPress versions among Kinsta users in 2024.

Most used WordPress plugins

Kinsta customers rely on a variety of plugins to enhance their WordPress sites, whether for e-commerce, SEO, security, or performance. After processing data from over 140k environments on our server, we found an impressive 81,904 unique plugins in use.

Here are the top nine most-used plugins (excluding must-use plugins) among Kinsta customers in 2024:

  1. Yoast SEO – 83,984 environments
  2. Akismet Anti-Spam: Spam Protection – 54,155 environments
  3. Advanced Custom Fields PRO – 46,203 environments
  4. Elementor – 45,357 environments
  5. Classic Editor – 43,303 environments
  6. Gravity Forms – 42,354 environments
  7. Redirection – 38,908 environments
  8. Elementor Pro – 37,936 environments
  9. Yoast Duplicate Post – 33,684 environments

These plugins reflect the diversity of Kinsta’s customers, from bloggers and businesses to developers and agencies.

Unmatched 24/7/365 support

At Kinsta, delivering top-notch support isn’t just part of what we do — it’s who we are. Our team of 44 expert support engineers is available 24/7/365, distributed across multiple time zones, offering assistance in 10 supported languages:

  • English 🇺🇸
  • Spanish 🇪🇸
  • Portuguese 🇵🇹
  • Japanese 🇯🇵
  • Italian 🇮🇹
  • French 🇫🇷
  • German 🇩🇪
  • Dutch 🇳🇱
  • Danish 🇩🇰
  • Swedish 🇸🇪

We’re committed to ensuring that every customer receives the help they need when they need it.

This was reflected in the fantastic feedback from our customers throughout the year. Our support team achieved an outstanding 97.6% positive conversation rating for the year — a 0.3% increase from the previous year — showing we’re doing an excellent job supporting our customers.

Support conversation ratings by our customers.
Support conversation ratings by our customers.

But hold on for a second — there are more stats! Here’s what the numbers say about our support efforts:

  • 120,364 support conversations were responded to, an increase of 20,604 compared to 2023.
  • The median first response time was 1m 2s, an improvement of 22 seconds from 2023 — a cherry on top of an already remarkable achievement!
  • The median time to close support conversations was 43m 10s, reduced by 1m 28s compared to 2023.
  • The median positive rating was 97.6%, a 0.3% improvement from last year.
  • Times around 15:00 UTC were our busiest hour in support. You might want to avoid that! 😁

Additionally:

  • The Malware and Abuse team resolved over 3,700 cases of spam, malware, and terms-of-service violations.
  • The Migrations team successfully moved over 10,000 sites to our platform. As a refresher, we offer unlimited free migrations.
Breakdown of support team response times.
Breakdown of support team response times.

We feel lucky and privileged to serve our amazing customers. Their appreciation for our hard work really warms our hearts and brightens our days.

Top feature releases in 2024

With 31 features released over the past year, our engineers and development teams worked tirelessly to deliver a steady stream of updates and improvements, driving remarkable progress and success. The sections below highlight all the major features introduced and enhanced, making it an outstanding year for Kinsta.

Unlimited free migrations and expedited site transfers

We made migrating to Kinsta easier than ever. We removed all limits on free WordPress migrations from other hosting providers, so whether you’re moving one site or a hundred, you can now do it at zero cost.

Kinsta's site migration options from other hosts.
Kinsta’s site migration options from other hosts.

But we know that sometimes you need things done fast. That’s why we introduced expedited migrations, allowing you to move your site to Kinsta within eight hours for a one-time fee of $49. And if we don’t complete the transfer in time, you get your money back.

Agencies on Kinsta also have a special perk: up to 10 free expedited migrations, depending on their plan. Our documentation explains how to request a migration.

If you’re already a customer, you can find them under WordPress Sites > Add Site dropdown > Request Migration. Otherwise, sign up for Kinsta first and then proceed the same way from your MyKinsta Dashboard.

Request a site migration on MyKinsta.
Request a site migration on MyKinsta.

Increased resources on all plans and new names

We revamped our Managed hosting for WordPress plans, making them easier to understand and packed with more resources.

We ditched the old, unclear labels like Business 1 Single and Enterprise 3. Now, single-site plans are named after their included visitor limit (e.g., Single 35k for 35,000 visits/month), while multiple-site plans reflect the number of WordPress installs they support (e.g., WP 120 for 120 installs).

Beyond the name changes, we increased visitor limits and CDN bandwidth across all plans without raising prices. We even introduced a new Single 65k plan with 65,000 visits/month and 250GB of CDN bandwidth.

These updates make choosing the right Kinsta plan simpler while ensuring you get even more value from your hosting.

Your first month is on us

Switching web hosts is a big decision, and we get it. You want to be sure you’re making the right move. That’s why we introduced a free first month on select Kinsta plans, giving new customers a chance to experience our premium Managed WordPress Hosting with zero upfront cost and no long-term commitment.

This offer gives you access to everything Kinsta has to offer, including:

  • Blazing-fast performance with Google Cloud’s C3D machines
  • Unlimited free migrations (with an expedited option if you’re in a hurry)
  • Built-in security and automatic backups for total peace of mind
  • Powerful tools in MyKinsta to optimize and manage your sites
  • 24/7 expert support from real engineers

Whether you’re looking for better performance, stronger security, or more hands-on support, your first month at Kinsta is completely free, so you can see the difference for yourself with no strings attached.

Add extra WordPress sites without upgrading your plan

We introduced a new WordPress site add-on, giving customers the flexibility to add extra sites to their existing plan for $30 per site per month without switching to a higher-tier package.

It’s a cost-effective way to scale your needs when you’re not ready yet to justify a full upgrade. The WordPress analytics page within Company settings can help you determine if this option makes sense for you.

MyKinsta WordPress analytics.
MyKinsta WordPress analytics.

You can find more details about this feature in our documentation.

PHP Performance tool

As part of our last feature for the year 2024, we introduced the PHP Performance tool to give you more control over how your WordPress site handles traffic and tasks. With this tool, you can adjust the number of PHP threads (previously known as “PHP workers”) and the memory allocated to each one, making it easier to fine-tune your site’s performance.

Kinsta's PHP Performance tool.
Kinsta’s PHP Performance tool.

Whether you’re tackling high traffic or optimizing resource use, you can customize these settings directly in MyKinsta for live and premium staging environments. It’s a smarter way to keep your site running smoothly and handle any demands that come your way.

Simplified caching and DNS management

Caching tools have been neatly grouped on a single page for each site in MyKinsta. You can access Edge Caching, Server Caching, the Kinsta CDN, and even Redis Cache, which you can install and configure yourself without contacting support.

Caching in MyKinsta.
Caching in MyKinsta.

Easy DNS management on site admins’ hands

For DNS management, we made life easier for organizations and agencies. Instead of allowing  DNS settings to be managed only by company administrators, Kinsta made it possible to assign site administrators to manage their DNS records, making it easier for agencies and enterprise customers to manage DNS on their own without any request.

Bulk Actions

Managing dozens or even hundreds of sites can be overwhelming for agencies, enterprises, and developers managing multiple WordPress sites. That’s where the Bulk Actions feature comes in. It allows you and your team to perform repeated tasks across multiple environments at once, saving valuable time and effort.

Bulk Actions can target live and staging environments of the same site or any combination of environments across multiple web properties. The screenshot below shows what you can do with Bulk Actions on the sites you select:

  • Clear cache
  • Update plugins and themes
  • Change edge caching
  • Change CDN
  • Change PHP settings
  • Export to CSV
  • Change labels
Kinsta Bulk Actions tool.
Kinsta Bulk Actions tool.

Plugin and theme updates across multiple sites made easy

Keeping WordPress sites secure and up to date is a constant task, but we’ve made it much easier. Now, you can update plugins and themes across multiple sites directly from MyKinsta — no need to log into each WordPress admin dashboard.

Both features work across live and staging environments, allowing you to apply updates selectively or all at once. You can filter by available updates, search for specific plugins or themes, and update them across all sites, specific sites, or individual environments.

Update plugins and themes across multiple WordPress sites in MyKinsta.
Update plugins and themes across multiple WordPress sites in MyKinsta.

This centralized control means fewer missed updates and a faster, more secure WordPress experience. Bulk Actions is a feature we constantly improve, so expect even more functionality in MyKinsta soon! Learn more about managing bulk updates in our documentation.

Enhanced Selective Push

The Selective Push feature in MyKinsta has always given users control over what they push from their staging environments to production — whether files, databases, or both.

We enhanced this functionality to support even more granular development workflows: you and your team can choose to deploy specific files and folders, and specific database tables from staging to live and from live back to staging, offering you unparalleled flexibility in WordPress deployments.

Selective push from staging to live environment.
Selective push from staging to live environment.

New Kinsta API endpoints for improved WordPress site management

We expanded the Kinsta API, making it easier than ever for developers and agencies to manage WordPress sites programmatically. These updates allow users to automate key site management tasks, reducing the need for manual dashboard interactions.

Here are the new endpoints added to our API:

With these endpoints and others, you can automate site management, streamline workflows, and eliminate manual updates.

Reset your WordPress site in MyKinsta

If you need a fresh start for your site, our new reset WordPress site option allows you to reinstall WordPress while preserving domain configurations, historical backups, and activity logs.

Instead of starting from scratch, this feature removes and reinstalls WordPress while preserving key configurations like your data center, multisite setup, and installed plugins (Yoast SEO, WooCommerce, and Easy Digital Downloads). It even creates a final system backup before resetting.

Reset your WordPress site in MyKinsta.
Reset your WordPress site in MyKinsta.

To reset your site, click WordPress Sites > sitename > Info > Reset site.

Centralized Add-ons page easily reachable within MyKinsta

We also introduced a dedicated Add-ons page where you can explore, manage, and buy add-ons from MyKinsta. Previously, purchasing them required assistance from our support team; now, you have complete flexibility and can pick and choose those you need in a self-serve fashion.

Centralized Add-ons page in MyKinsta.
Centralized Add-ons page in MyKinsta.

Five new data centers

At the end of 2023, we began adopting Google’s C3D machines, a new generation of virtual machines with improved hardware and more efficient I/O. Testing showed impressive results, with response times improving by 20% to 50% compared to the already fast C2 machines.

Since C3D machines weren’t available in all Google Cloud data centers, we rolled them out as they became available. By upgrading six regional data centers in 2023 and five more in 2024, we increased the number of “Boosted” locations in MyKinsta to 11. These upgrades allowed more customers to experience the benefits of high-performance C3D machines.

Beyond these upgrades, we also expanded our total number of data centers, bringing the global count to 37. This included launching our first data center in Africa, located in Johannesburg, South Africa, and adding a second Middle East data center in Dammam, Saudi Arabia. While these two new locations don’t yet support C3D machines, they significantly reduce latency for customers in these regions, improving site performance.

Kinsta's data centers and CDN locations.
Kinsta’s data centers and CDN locations.

Faster navigation in MyKinsta with omni-search and shortcuts

The first feature introduced in 2024 was keyboard-powered omni-search for fast navigation. When you press CMD + K (macOS) or CTRL + K (Windows/Linux), a command dialog opens, perfect for those who prefer keyboard navigation over the mouse.

Command dialog for omni-search navigation.
Command dialog for omni-search navigation.

For those who prefer a mouse, we added a breadcrumb path to the top menu and a “Jump-to or search” dialog box that makes reaching important assets effortless.

Breadcrumb paths and a jump-to search field.
Breadcrumb paths and a jump-to search field.

Advanced access management and data security

We introduced new SFTP/SSH management options in the MyKinsta dashboard, giving customers greater control over site security. These enhancements include:

  • Disabling and re-enabling SFTP/SSH access
  • Auto-expiring passwords
  • Enabling or disabling password authentication
  • Downloading access configurations for third-party tools
  • Setting IP allowlists for SFTP/SSH and phpMyAdmin
View and manage SFTP/SSH options and credentials in MyKinsta.
View and manage SFTP/SSH options and credentials in MyKinsta.

New security and data protection certifications

Kinsta earned ISO 27001, 27017, and 27018 certifications, recognizing our commitment to the highest international standards for information security and data protection in cloud environments.

These updates ensure your data and site security are and will always be in safe hands.

As you can see, our teams have been hard at work delivering improvements to make managing your sites even better, faster, and more secure.

What customers say about us

In 2024, we received 500+ new reviews on G2 and Trustpilot, with G2 reviewers awarding us an incredible 186 G2 awards. This recognition places Kinsta as the #1 Managed WordPress Hosting provider out of 339 contenders, with an outstanding 4.8 out of 5-star rating.

Some G2 awards from 2024.
Some G2 awards from 2024.

The best compliment we could ever receive as a hosting company is knowing that Kinsta has helped a customer’s business succeed and has given them the perfect infrastructure for managing their websites.

G2 review by Victor P.
G2 review by Victor P.

We want to give a big shout-out to all our customers, including partners, agencies, educational institutions, and enterprise clients, who trust us to manage tens or even hundreds of sites.

G2 review by Paul L.
G2 review by Paul L.
G2 review by Amy M.
G2 review by Amy M.

We receive reviews from customers worldwide who have shared how Kinsta has improved their website’s SEO, speed, and security, highlighting the real benefits of switching to our platform.

G2 review by Brandon H.
G2 review by Brandon H.

We’re honored by the trust and appreciation shown by our customers, and it motivates us to keep delivering the very best in managed WordPress hosting. You can read more Kinsta reviews on G2 and Trustpilot.

High-quality content is still a major focus

The role of content has evolved significantly over the past year, but at Kinsta, we continue to see it as the most powerful way to share knowledge, build relationships, and help businesses grow.

Our commitment to creating high-quality, insightful content remains unwavering. We make sure our community and customers have the resources they need to expand their knowledge, tackle technical challenges, and succeed.

Throughout the year, we poured thousands of hours into publishing and updating more than 250 content pieces, among articles and tutorials, web pages, case studies, and changelogs, to ensure you get the information you need.

To give you a taste of the best of 2024, take a peek at the best performant articles we published:

Beyond that, we translated over 1,600 pieces of content into many languages relevant to our audiences worldwide, such as Spanish, French, German, Dutch, Italian, Portuguese, Japanese, Swedish, and Danish. This effort ensures that our content reaches our community worldwide, helping everyone succeed no matter what language they speak.

Rock-solid documentation

We overhauled our documentation in 2024, introducing a dedicated site for everything MyKinsta and DevKinsta, along with a separate site exclusively for API documentation. The new sites feature enhanced structure, intuitive navigation, and improved search capabilities, providing an exceptional user experience. This makes it easier than ever to explore existing features, discover new ones, and gain a clear understanding of how everything works across our products and APIs.

Kinsta Talks: exclusive insights from the WordPress industry

We launched Kinsta Talks, a series hosted by our Community Manager, Roger Williams, where he connects with passionate professionals shaping the WordPress world. From developers to designers, Kinsta Talks dives into their stories, insights, and tips on everything WordPress.

We published 40 videos, with several gaining significant traction:

Kinsta Talks is our way of bringing the WordPress community closer, sharing expertise, and celebrating the innovations driving the ecosystem forward.

Our presence in WordPress events around the world

We value the vibrant WordPress ecosystem and its incredible community. In 2024, we attended and sponsored several WordPress events worldwide, strengthening our ties with the community and sharing our passion for the platform.

From WordCamp US in Portland 🇺🇸 to WordCamp Europe in Turin 🇮🇹 and WordCamp Asia in Taipei 🇹🇼, our team connected with thousands of WordPress enthusiasts, clients, and partners. We also attended WordCamp Sydney 🇦🇺, embracing the unique perspectives of Australia’s thriving WordPress community.

Kinsta team at WordCamp US, Europe, Sydney, and Asia.
Kinsta team at WordCamp US, Europe, Sydney, and Asia.

As a distributed company, Kinsta team members also attended local WordCamps and meetups across Europe, including events in Wrocław 🇵🇱, the Netherlands 🇳🇱, Vienna 🇦🇹, and Romania 🇷🇴.

Kinsta team at WordCamps across Europe.
Kinsta team at WordCamps across Europe.

Here are a few more events we sponsored or attended (there’s more!):

  • WordCamp Skopje
  • WP Meetup Amsterdam
  • WP Meetup Rotterdam
  • WP Meetup Utrecht
  • WordPress Meetup Ancona

What to expect in 2025

The new year is already underway, and while I can’t reveal all the exciting news we have in store for 2025 just yet — trust me, they’ll be game-changing — I’m thrilled to share a sneak peek of what’s coming your way.

Smarter and more efficient ways to manage your websites or clients’ websites

As highlighted in this post, we introduced numerous features in 2024 to simplify and improve website management. And we won’t stop there!

This year, expect even more features to help you manage your WordPress sites, plugins, and themes effortlessly. There will also be additional endpoints for the Kinsta API and other enhancements designed to make site management easier and more efficient.

More solutions to help our customers grow their business

At Kinsta, our customers are at the heart of everything we do.

In 2025, we’re committed to delivering even more tailored solutions for developers, educators, agencies, and businesses — empowering them to thrive online like never before. Here’s a glimpse of what’s in the pipeline:

  • Easy-to-manage automatic updates for plugins and themes for improved efficiency.
  • Additional payment options for our customers.
  • Longer analytics data retention beyond 30 days for in-depth analysis.
  • Multiple options for improved control over SSH and SFTP access.
  • Improvements to DevKinsta for a smoother development experience.

And this is just the beginning! Subscribe to our newsletter to stay informed about new releases and tutorials!

What else?

We’d also love to hear from you. What features made the biggest difference for you in 2024, and which ones are you looking forward to in 2025? Share your thoughts in the comments — your feedback inspires us to have new ideas and keep improving our products, services, and solutions.

Once again, a big “thank you” to all our customers for trusting us with their business and allowing us to be a part of their journey. We’re excited to continue supporting all the great things you create and growing together.

We wish you all an incredible 2025! If you’re not fully satisfied with your current hosting provider, you should give Kinsta a try. Your first month is completely free!

The post Kinsta’s Year in Review — the best of 2024 appeared first on Kinsta®.

]]>
https://kinsta.com/blog/2024-year-in-review/feed/ 0
Redis object caching for WordPress: the complete installation guide https://kinsta.com/blog/redis-for-wordpress/ https://kinsta.com/blog/redis-for-wordpress/#respond Tue, 11 Feb 2025 15:05:39 +0000 https://kinsta.com/?p=189853 WordPress powers a huge chunk of the web, but its popularity highlights the challenge of maintaining optimal performance. One powerful solution for improving WordPress performance is ...

The post Redis object caching for WordPress: the complete installation guide appeared first on Kinsta®.

]]>
WordPress powers a huge chunk of the web, but its popularity highlights the challenge of maintaining optimal performance. One powerful solution for improving WordPress performance is Redis object caching. Using this in-memory key-value database as a cache reduces the number of queries sent to a site’s primary database.

This guide shows you how to install and work with Redis object caching for your WordPress website. For Kinsta customers, the process is particularly straightforward.

Understanding object caching

When you load a WordPress page, your server typically needs to make multiple database queries to fetch the content, settings, and other data it needs to display the page. Each query takes time, and as your site grows, these small delays can add up to noticeable slowdowns.

Object caching helps by storing the results of these database queries in memory. The cache stores the queries you use often and waits until you need them.

Object caching can transform how your WordPress site handles data retrieval and processing, and the impact extends beyond simple speed improvements. When your site experiences sudden traffic spikes, such as during a successful marketing campaign or after a viral social media post, Redis can act as a buffer between your visitors and your database.

Rather than each visitor triggering new database queries, Redis will serve cached data from memory. This can let a site handle significantly more concurrent users across your entire site without performance degradation.

For an e-commerce site on Black Friday, Redis-cached product information could reduce the database load and let that site handle more traffic volume without requiring additional server resources. This efficiency translates directly into hosting cost savings, as it can serve more visitors with the existing infrastructure.

How WordPress uses its database

Understanding the way WordPress interacts with its database can help to explain why caching becomes crucial as a site grows. Consider what happens when someone visits your site’s home page. Unless it’s responding with the results of a page cache, WordPress orchestrates a complex symphony of database queries to build a dynamic page.

Kinsta's home page showcasing a managed WordPress hosting service against a dramatic dark red and black background with geometric patterns. There are two Call To Action buttons below labeled View features and View pricing.
The main Kinsta website home page.

Let’s walk through a typical home page load: first, WordPress queries the wp_options table to fetch your site’s settings, theme configuration, and active plugins.

The SequelAce database management interface showing the wp_options table from a WordPress installation. The table contains system configuration settings with columns for option_id, option_name, and option_value. Various WordPress settings are visible including default comment status, ping settings, date formats, and template configurations.
The wp_options table within the SequelAce app.

If you have extra widgets, Blocks, or elements in your sidebar, this will trigger additional queries. For example, a Recent Posts section will need post data, categories need term counts, and any search functionality needs to build an index.

The WordPress Site Editor interface displaying a post template with a title section, author byline area, and content block explanation. On the right-hand side is a Popular Categories list showing various taxonomy terms with post counts in parentheses. The interface includes settings for displaying categories as a drop-down menu, showing post counts, and hierarchy options.
Editing the sidebar within the WordPress Site Editor.

If you’re using a page builder plugin or an otherwise complex theme, these queries will multiply significantly. The complexity compounds with dynamic content. Take a common blog setup where posts display author information, categories, tags, and related posts:

A blog post within the Site Editor showing Latin text
A blog post layout within the WordPress Site Editor.

Each post preview on your home page requires WordPress to join data across multiple tables. It pulls the core content from wp_posts, grabs author details from wp_users, and collects metadata from wp_postmeta. A home page displaying just ten post previews might execute dozens of separate database queries.

The bottlenecks within the WordPress database

This database architecture also reveals common bottlenecks that impact performance. Custom post types, while powerful for organizing content, often need to rely on wp_postmeta for storing additional fields.

Some websites — think of an online store or real estate directory — might make hundreds of queries per page load just to display each product or property. Each must display individual details such as square footage, quantity, pricing, bedrooms, variations, and more as separate metadata entries.

The wp_options table can become another bottleneck. This is because it will store the settings for any plugins that offer them.

The impact becomes more pronounced when you factor in concurrent visitors. Each user will trigger their own set of queries, and WordPress will carry out independent processing for each of them. During traffic spikes, this processing can create a bottleneck that slows down an entire site.

These database interactions make caching invaluable. If you implement Redis object caching properly, it can intercept these repeated queries and store the results in memory. Instead of executing multiple joins and metadata queries for each visitor, WordPress can retrieve the pre-processed data directly from Redis. The result is that it can often reduce dozens of database queries down to a single cache lookup.

Popular choices for WordPress object caching

When it comes to object caching solutions for WordPress, several options are available. Not every host will support all options, which means you need to ensure your choice of object cache can achieve what you need.

Memcached is one of the oldest and most widely used caching systems. It’s a distributed memory caching system that’s simple and effective. It has a lot of support thanks to its longevity and is generally lightweight when it comes to resource usage. With good support and documentation, Memcached is a popular solution for object caching at all levels.

The Memcached project home page showing a distinctive header with cartoon-style bunny characters in white with turquoise accents. The main content explains Memcached as a free, open-source, distributed memory caching system. The page includes a Quick Example section with code samples, a Play with telnet demonstration, and a Supported By section.
The Memcached website.

Given this focus on ease of use, more complex scenarios might not be suitable for this simple key-value store. It also doesn’t offer “persistent” storage, which means it will clear by the time the next page loads.

Couchbase can offer a more complex solution that combines document database capabilities, typical key-value storage functionality, and built-in clustering. The latter technology automates data grouping for better performance — similar to how Windows Disk Defragmenter works to improve that operating system’s disk performance.

Couchbase's landing page showing a marketing campaign targeting MongoDB users, with the headline Realm regret? Switch to Couchbase Mobile. The right side of the screen displays a code editor showing an SQL query example for finding shoes. The bottom of the page displays logos of major companies including DirectTV, Equifax, GE, PayPal, and PepsiCo.
The Couchbase website.

However, Couchbase’s key-value storage is secondary to its document-driven architecture. This could be a problem if you need fewer query limitations and greater accuracy in data validation and consistency.

Why Redis stands out for WordPress

For WordPress, Redis offers several advantages over the direct competition. Unlike Memcached, Redis supports complex data structures such as lists, sets, and sorted sets. This aligns well with WordPress’s data organization needs and gives you a way to scale up towards greater and more complex setups.

When it comes to using these different structures, Redis’s “atomic operation” is crucial. In a nutshell, this uses a concept of transactions and groups various commands together to run at once. The actual functionality is more complex than this, but atomic operations typically ensure data consistency — which is crucial for any WordPress website.

There are two more benefits of using Redis with WordPress:

  • Persistence. Redis can persist data to disk. This provides better data durability compared to an in-memory solution.
  • Better memory management. Redis offers more sophisticated memory management options than other caching tools. This can give you better control over your object cache’s behavior.

Redis has applications that go beyond object caching, but for WordPress, the unique makeup of the database solution means its key-value storage is almost an ideal partner.

The relationship between WordPress and Redis

WordPress includes its own object caching functionality through the WP_Object_Cache function. At its core, this acts as an intermediary layer between your site’s code and the database using standardized functions to manage cached data.

When a plugin or theme requests data, WordPress first checks if the data exists in the object cache using these built-in functions. For example, here’s code that retrieves a user’s comment count:

function get_user_comment_count($user_id) {
    // Generate a unique cache key
    $cache_key = 'user_comment_count_' . $user_id;
    
    // Try to get the value from cache first
    $comment_count = wp_cache_get($cache_key, 'user-stats');
    
    // If not in cache, query the database
    if (false === $comment_count) {
        global $wpdb;
        $comment_count = $wpdb->get_var(
            $wpdb->prepare(
                "SELECT COUNT(*) FROM $wpdb->comments WHERE user_id = %d",
                $user_id
            )
        );
        
        // Store the result in cache for future requests
        wp_cache_set($cache_key, $comment_count, 'user-stats', 3600); // Cache for 1 hour
    }
    
    return $comment_count;
}

When properly configured with Redis, the function intercepts database requests and checks if the required data exists in the Redis cache before WordPress makes a database query.

And the integration extends beyond simple key-value storage. Redis’s ability to handle complex data structures mirrors the WordPress hierarchical content organization. For instance, when WordPress needs to retrieve a complex query result, such as all child pages of a parent page with their associated metadata, Redis stores this entire data structure as a single cache entry.

This integration could substantially improve performance. Redis stores all data in memory, which means access times are in microseconds rather than the milliseconds typically required for database queries. This doesn’t seem valuable, but for sites with heavy database usage, this difference could net page load times that are two or three times faster.

WordPress’s object cache also supports advanced Redis functionality through additional configuration. For example, you can implement cache tags for more granular cache management:

function get_category_posts($category_id) {
    $cache_key = 'category_posts_' . $category_id;
    
    $posts = wp_cache_get($cache_key, 'category-posts');
    
    if (false === $posts) {
        $posts = get_posts(array(
            'category' => $category_id,
            'posts_per_page' => 10
        ));
        
        wp_cache_set(
            $cache_key,
            $posts,
            'category-posts',
            3600,
            array(
                'tags' => array(
                    'category_' . $category_id,
                    'front_page_content'
                )
            )
        );
    }
    
    return $posts;
}

// Later, when a post in this category updates:
wp_cache_delete_by_tag('category_' . $category_id);

This relationship between WordPress and Redis creates a powerful caching system that intelligently manages data persistence while maintaining data consistency. The WP_Object_Cache function ensures that all your plugins and themes can benefit from Redis caching without requiring direct implementation. Also, advanced functionality in Redis provides the flexibility you need for complex WordPress installations.

Kinsta customers can install Redis in less than 5 minutes

Consider a typical scenario: your WooCommerce store slows down with increased traffic. At many web hosts, implementing Redis involves accessing the server, manual installation, configuring security settings, and careful testing. This could easily be a day of technical work — and more if you encounter errors. Kinsta’s Redis implementation transforms this process entirely.

You have the option to add Redis object caching with a few clicks in the MyKinsta dashboard for $100 USD a month. Customers can navigate to WordPress sites > sitename > Add-ons > Redis caching (or WordPress sites > sitename > Caching > Redis) and click the Enable button:

A screenshot showing the Redis caching entry among the Add-ons available in the MyKinsta dashboard.
The Redis caching add-on is within the MyKinsta dashboard.

Kinsta’s integration can have a big impact on your site and its performance:

  • It applies an optimal configuration for WordPress websites. This includes adjusting cache expiration times — for instances where cart abandonment issues could be problematic. Expiration time optimization is a common issue that can plague improperly configured Redis installations.
  • The Redis integration runs silently in the background. For you, this is good news as you can continue with managing your site while benefiting from the performance object caching will provide.
  • You have flexibility when it comes to monitoring your object cache and have deep integration with Kinsta’s functionality and architecture.

The integration with other tools within MyKinsta is a huge benefit, as Redis becomes part of your overall caching strategy. Monitoring the impact of the performance is also a key facet you must consider.

How to implement Redis for your Kinsta website

The initial setup for Redis object caching with your Kinsta-hosted WordPress site is fast. When you enable the add-on, Kinsta automatically installs and configures the Redis Object Cache plugin. This cuts down the need for further setup and configuration. You also have the flexibility to use a different connection plugin if you wish, although you will need to disable the Redis Object Cache plugin from within WordPress to do so, click the Deactivate link in the plugin’s group within the WordPress admin dashboard:

The WordPress admin database showing a close-up of information for the Redis Object Cache plugin. The interface shows deactivation and settings options, with a description indicating it's a persistent object cache backend supporting sentinels, clustering, and WP-CLI.
The WordPress Plugins page and the Redis Object Cache plugin.

Much of managing your Redis installation will happen on your WordPress website through your plugin’s settings. This includes clearing the cache. The Kinsta MU plugin adds this option to the WordPress toolbar:

The WordPress admin dashboard header showing notification indicators and an Object Cache label within the black toolbar. Below this is a Redis Object Cache widget displaying performance metrics including Time, Bytes, Ratio, and Calls columns, with a reading of 5 ms visible.
The WordPress admin dashboard showing the Object Cache option within the toolbar.

However, there are a few ways you can clear the Redis cache beyond WordPress. For example, the WordPress sites > sitename > Caching > Server Caching screen within MyKinsta will allow you to achieve this:

The Server Caching settings page within the MyKinsta dashboard. It includes tabs for Edge Caching, CDN, Server Caching, and Redis. The interface explains that cache improves site load times by storing site data and includes options to clear the cache or change cache expiration settings. A left-hand sidebar provides navigation to other settings such as Domains, Backups, and Tools.
The Server Caching screen within the MyKinsta dashboard.

This option clears all of the caches your site uses, as does the alternative approaches using Secure Shell (SSH) and the WP-CLI.

How to install Redis on some other WordPress web hosts

While Redis is a popular way to set up an object cache, not every host will offer access or integration. This means you may need to get your hands dirty with code on your server.

Each web host will have a different approach to doing this — some may not even give you the root access you need. However, the typical steps will include preparing the server, installing Redis, and then configuring WordPress to use it.

Server preparation and installation

Installing Redis requires a properly configured server environment. For some WordPress hosts, this may mean you choose a suitable plan. It’s likely that you won’t be able to do this on typical shared hosting or even managed tiers. A virtual private server (VPS) will be the starting point for your efforts, but dedicated cloud hosting will be ideal.

Regardless, your PHP installation will need the phpredis extension. Installing this lets Redis work with PHP — essential for also working with WordPress. You will need to use specific compilation flags and configuration options, of which there are many.

On Ubuntu systems, install the required components with:

sudo apt-get update
sudo apt install redis server

Once the installation process completes, run sudo service redis status to check that Redis is running in the way you’d expect. You may also want to run redis-cli --version to check that the installation completes as you’d expect too.

Once you have Redis running on your server, you can install the phpredis extension:

sudo apt-get install php-redis
sudo phpenmod redis

This is all you need to do to install Redis, but you still need to configure it for your server and your available resources.

Redis configuration

The Redis server configuration file will need your attention before you let it begin to work on your site. The first task is to understand whether WordPress and Redis work on the same server. Typically, this will be the case, so you need to bind the localhost address (127.0.0.1).

You can choose any editor for the job of accessing your Redis configuration file, but nano is perfect and will be available on almost every server instance you find:

sudo nano /etc/redis/redis.conf

In the majority of cases, you can find the right line and uncomment it before you save your changes:

bind 127.0.0.1 ::1 # listens on loopback IPv4 and IPv6

You may want to make further changes to this configuration file. Here’s an optimal setup for WordPress sites:

maxmemory 256mb
maxmemory-policy allkeys-lru
appendonly yes
appendfsync everysec
save 900 1
save 300 10
save 60 10000

Each configuration choice serves a specific purpose:

  • The maxmemory setting of 256MB provides a good starting point for most WordPress installations. This setting prevents Redis from consuming excess system memory while maintaining enough cache space to improve performance significantly.
  • The allkeys-lru maxmemory-policy ensures the most frequently accessed content stays in cache. Some sites benefit from volatile-lru instead, especially when caching session data alongside regular content.
  • The appendonly and appendfsync settings manage Redis’s persistence behavior. While Redis serves primarily as a cache, maintaining persistence prevents complete cache losses during server restarts. The everysec setting balances performance with data safety.

The save directives control when Redis creates point-in-time snapshots of the dataset. The example configuration tells Redis to save:

  • Every 15 minutes after one change.
  • Every five minutes after 10 changes.
  • Every minute after 10,000 changes.

These persistence settings will help maintain cache efficiency while protecting against data loss.

Configuring Redis security and testing changes

You should also look into security here. For example, you can set up password authentication using the requirepass command and even rename “dangerous” commands. The Redis access control list (ACL) puts limitations on certain destructive commands, and you should look over the whole list to see if any may affect you.

Once you complete all of these steps, it’s a good idea to test your Redis server’s performance. The Redis CLI offers several benchmark commands for this purpose:

redis-cli --latency
redis-cli info | grep used_memory_human
redis-cli info | grep connected_clients

In short, they establish baseline performance metrics for ongoing monitoring and should be part of your regular maintenance workflow.

Configuring WordPress

Once Redis is running on your server, WordPress needs to be configured to use it as an object cache. The configuration typically includes specifying the Redis connection details, such as the host, port, and any authentication credentials.

You could manually add the appropriate object cache drop-in file to your wp-content directory, although installing a dedicated Redis object cache plugin can be the best way to achieve this. The only one we recommend here is the Redis Object Cache plugin mentioned above, as Kinsta doesn’t support many caching plugins due to its own functionality. The Redis Object Cache plugin is more of a helper for connecting WordPress to the key-value store.

Redis management beyond the installation

Typical Redis object cache installations provide access to the Redis CLI. At Kinsta, this extends all the way through your development workflow, such as with staging environments and DevKinsta.

Fundamental monitoring

This command line interface hands you powerful capabilities to connect to your Redis instance and gain immediate insight into how your cache operates. For instance, you can reveal cached data patterns, analyze memory usage, and execute maintenance tasks in real-time.

For basic monitoring, there are a few essential commands to note:

redis-cli INFO stats           # View cache hits and misses
redis-cli INFO memory         # Check memory utilization
redis-cli MONITOR            # Watch live cache operations

The MONITOR command streams cache operations in real time, which shows exactly how WordPress interacts with Redis. This visibility helps you to identify cache patterns and optimization opportunities. The SLOWLOG command identifies problematic queries:

redis-cli SLOWLOG GET 10     # View the 10 slowest recent operations
redis-cli SLOWLOG RESET      # Clear the slow log for fresh monitoring

You have options that extend much further into what Redis can offer.

Deeper Redis monitoring commands

A simple way to rein in resources is to monitor Redis’s connection limits. It’s an excellent way to prevent resource exhaustion:

redis-cli CLIENT LIST | wc -l    # Count active connections
redis-cli CONFIG GET maxclients  # Check maximum allowed connections

WordPress uses Redis as a way to speed up the read access for its database. The cache entries are persistent and can always be cached again in the future. To support that, Redis supports “eviction policies” for keys it stores.

However, this can bring drawbacks in the form of memory pressure. A low “hit ratio” — which compares the total number of operations to those on existing keys — is evidence of that, so tracking the following metrics could be vital:

redis-cli INFO stats | grep evicted_keys
redis-cli INFO stats | grep hit_rate

If you find your database does suffer from memory pressure, you can choose to increase the available memory, optimize any key expiration policies, and implement selective caching strategies. The exact approach you take will depend on your site and the pressure your memory is under.

Using a GUI with Redis

There’s much more to discover with Redis commands and using the CLI, although it won’t be an appropriate tool for some. This is where the Redis Insight app could be useful.

The dark-themed Redis Insight database management interface lists multiple Redis stack instances running on different localhost ports (6379, 12001, 7777, 8102, 8103, 8100, and 8101). Each instance is marked as Standalone and includes various Redis modules such a RedisSearch, RedisJSON, RedisGraph, RedisTimeSeries, and RedisBloom.
The Redis Insight GUI app.

This gives you a GUI to view your Redis object cache without the need for a terminal, server access, or command line work. As you would work with a tool such as TablePlus or SequelAce to view your WordPress database, an app such as Redis Insight is quick to set up and could streamline your workflow.

Common Redis challenges and solutions

Most of the time, your Redis installation will work without further maintenance. However, some Redis implementations can present challenges that will demand your attention. For example, you might see a warning within MyKinsta that WordPress can’t detect a suitable connection plugin.

This appears when you choose to use a plugin other than Redis Object Cache and is safe to ignore under the vast majority of circumstances. However, note that optimally running Redis relies on a suitable connection plugin.

For example, you might not see the right metrics when analyzing within the Kinsta APM Tool (or other Kinsta analytics). This should be something you can counteract and resolve if you choose to build a custom Redis instance with Kinsta.

It’s also a good idea to understand your limitations with Kinsta’s Redis integration. For instance, you may see various errors where you use a non-typical WordPress installation type. Using a Bedrock installation is a common reason for errors and is something the Kinsta Support team can help you resolve.

Summary

Redis object caching delivers powerful performance improvements for WordPress sites through efficient data storage and retrieval. Success lies in proper implementation, regular monitoring, and maintenance. Utilizing Kinsta’s managed solution lets you work within these principles to ensure optimal site performance.

Each stage of Redis implementation builds on the previous one. First, start with proper server configuration. Then, integrate with WordPress integration. Finally, performance gains can be maintained through regular monitoring and optimization. This approach will help you create a robust caching infrastructure that grows with your site, with Kinsta at the base.

Do you have any challenges that Kinsta’s implementation for Redis object caching solves? We welcome your insights in the comments section below!

The post Redis object caching for WordPress: the complete installation guide appeared first on Kinsta®.

]]>
https://kinsta.com/blog/redis-for-wordpress/feed/ 0