Tag: php
How to Install and Configure Memcached with WordPress on Ubuntu and DDEV
In this blog post, I’ll guide you on how to install Memcached on Ubuntu and DDEV to boost your website’s speed. We’ll also explore the configuration process and its integration with WordPress using the Object Cache 4 Everyone plugin, simplifying the steps to achieve enhanced site performance. What’s Memcached? Memcached is a high-performance, distributed memory…
How to Use Bitbucket Pipelines for CI/CD in WordPress and Drupal Web Development
In the world of building websites, it’s important to work fast and without mistakes. Continuous Integration and Continuous Deployment (CI/CD) help make this happen by automating parts of our work. In this post, I’ll demonstrate how to leverage Bitbucket Pipelines for automating various tasks, such as testing and deploying projects built with Drupal and WordPress,…
How to Fix the ‘PHP Version Does Not Satisfy That Requirement’ Error in Composer for Drupal Projects
For those building Drupal websites, Composer is essential. It helps manage and add new website pieces, like modules and themes. But if you’ve ever felt lost about how Composer works, think of it as a helpful grocery shopper. Not sure about the analogy? Check out this article: “Understanding Composer: A Simple Analogy of Grocery Shopping…
Proxying Media Files in a Local WordPress Development Environment with DDEV
Proxying media files in a local WordPress development environment is an essential skill for developers who want to ensure that their local site reflects the content and functionality of the live production site. Downloading all the media files to your local environment might not be the best solution, especially if the production site has a…
Exploring Drupal Distributions: Using Open Social and Crypto as 2 Case Studies
Drupal distributions are pre-packaged versions of Drupal that come with additional features, themes, and configurations to cater to specific requirements, right out of the box. Think of them as ready-to-use Drupal bundles tailored to meet the needs of a specific type of website or application. These distributions aim to provide a faster, more efficient way…
How to Create and Use Drupal 8+ Services: A Detailed Guide with Practical Code
Drupal, the open-source content management system, has come a long way since its inception. With the release of Drupal 8, we saw a massive shift in the underlying architecture: the adoption of a more object-oriented programming approach using Symfony components. One notable component that was introduced in Drupal 8 is the service container, which has…
How to Efficiently Render HTML Markup in WordPress: A Practical Guide for Developers
Discover the power of template parts in WordPress and learn how to render HTML markup efficiently with our step-by-step tutorial. This comprehensive guide explores the benefits of using template parts, including modular code structure, reusability, and improved readability. Whether you’re a seasoned developer or just getting started with WordPress, this tutorial will provide you with…
How to Auto-Populate the Billing Email Field in WooCommerce Checkout Page with the woocommerce_checkout_get_value Filter
The woocommerce_checkout_get_value filter is a filter provided by the WooCommerce plugin for WordPress. This filter allows you to modify the value of a checkout field before it is displayed to the user during the checkout process. The woocommerce_checkout_get_value filter accepts two parameters: In the code snippet above, we check if the current checkout field is…
What are the benefits of PHP 8.1 and the Commands to upgrade from an older version on Nginx?
PHP 8.1 is the latest version of the popular server-side scripting language, and it brings a host of new features and improvements that make it a compelling choice for developers. In this article, we’ll highlight some of the key benefits of upgrading to PHP 8.1.
How to add the logged-in user’s roles as classes in the body element in WordPress
To add the user roles to the body of your WordPress pages, you can use the body_class hook. This hook allows you to add custom classes to the <body> element of your pages. Example of body_class hook to add classes to the body element Here’s an example of how you can use this hook to…