Magento 2 - Fix Missing Products & Search After Upgrading to Elasticsearch 8

What this guide fixes If, after upgrading Magento 2.4.6+ to use Elasticsearch 8, your product catalog pages show zero products or your search is broken, this post walks through the configuration steps required to fix it - including reindexing, enabling the right modules, and updating Elasticsearch settings. This page is for developers and sysadmins who already maintain a Magento 2 store and need a quick, practical fix for Elasticsearch 8 compatibility issues. ...

April 24, 2024 · 4 min · 661 words · Me

Magento 2 - Configuring Nginx Rate Limiting

Configuring Nginx rate limiting for Magento is both simple to get started, but complex to find the right balance. It is a great way to combat malicious traffic from web scrapers/crawlers, and less respectful 3rd party integrations. The default nginx status code for the limit is 503, it is important to change this to HTTP 429 Too Many Requests. HTTP 429 is the standard rate limiting code, and should prevent any negative indexing results with search engines, and as a bonus any bots should slow their crawl rate (if they respect the response code). ...

April 3, 2024 · 3 min · 472 words · Me

Local Wordpress Bedrock Development using Warden

The last few years i recently migrated to using Roots Bedrock to bootstrap new wordpress developments. It provides a host of extra features that makes wordpress half decent to work with, such as Composer support, ENV variables, ENV specific config, better directory structure etc. I suggest checking it out if you haven’t already. Anyway, since I mostly focus on Magento development. My goto local dev environment is Warden which does support standard Wordpress out the box, along with a few other PHP frameworks. Although there is a tiny bit of undocumented configuration to get Bedrock working properly. ...

March 26, 2024 · 2 min · 254 words · Me

Self-Hosted Sentry Setup with Docker - Quick Start Guide

Frontend monitoring is essential for running online ecommerce stores. For agencies and smaller merchants, SaaS monitoring solutions can become expensive quickly. By performing a self-hosted Sentry setup using Docker and Docker Compose, you can maintain full monitoring capabilities at lower cost while keeping control over your infrastructure. This guide walks you through server setup, installation, configuration, and backup for a self-hosted Sentry instance. TL;DR Set up a server (Hetzner recommended) with Ubuntu 22.04 Install Docker & Docker Compose Clone the Sentry self-hosted repo to /opt/sentry and checkout your desired version Customize /opt/sentry/sentry/config.yml and /opt/sentry/sentry/sentry.conf.py Run ./install.sh --report-self-hosted-issues Schedule regular backups with cron Automate monitoring with Docker and Docker Compose This guide provides a complete, self-hosted Sentry setup using Docker and Docker Compose for ecommerce monitoring, including installation, configuration, and automated backups. ...

January 6, 2024 · 2 min · 357 words · Me

Comparing Magento 2 DB Schema Changes

Recently I came across an issue on a site where the setup:db:status would constantly report Declarative Schema is not up to date even after consecutive runs. This was breaking the zero downtime deployment configuration for the store, as the CD process always saw DB updates to process. There seemed to be (at least at the time of writing) very little information / tooling on how to debug db schema issues. So after a bunch of reverse engineering Magento’s implementation of DB Schema, I ended up creating a simple script that compares the current DB schema with the current configuration in the compiled db_schema.xml. ...

November 12, 2023 · 2 min · 391 words · Me

Finding Magento 2 Uncacheable Blocks

A handful of times I have came across pages where full page caching is broken. Instead of diving through and grepping various XML files to identify what module is breaking the cache. I have wrote a section of code, that will identify any uncacheable blocks on the current page and display them in the bottom left of the page. ...

February 17, 2023 · 1 min · 171 words · Me

Magento 2 CLI Scratch File

I often find the need to test components / functionality independently of the system or execute single time use scripts. Which i find developing and deploying a whole module is a waste of time and resources. Some recent uses of scratch files are: Inspecting product or category data to help debug data issues Inspecting Cached Data Bulk assigning attributes Bulk renaming SKUs etc This is where scratch files come in handy, we can create a simple PHP file in the Magento root (I tend to prefix with z_ to easily find them). Then by using the following code at the top of the file, we can use object manager to instantiate/fetch classes to perform whatever operation we need. ...

February 17, 2023 · 1 min · 165 words · Me

OpenVPN Split Routing

When setting up a VPN you have the option to either route all traffic through, or only route specific traffic through it. Some of the benefits with split routing within a development team context are: Increased privacy Reduced VPN load, allowing more connections / less allocated resources Access to both local & VPN network resources while connected Server Configuration Within your main server configuration file server.conf remove the line that looks like the following if it exists ...

November 16, 2020 · 1 min · 175 words · Me

OpenVPN Quick Installation

You can simplify OpenVPN installation by using the OpenVPN installation script by NYR https://github.com/Nyr/openvpn-install On your target installation server, run the following to download and execute the script into your home directory. wget https://github.com/Nyr/openvpn-install/raw/master/openvpn-install.sh -O ~/openvpn-install.sh bash ~/openvpn-install.sh Default options you can choose are: UDP Protocol Port 1194 DNS Server 1.1.1.1 After the installer runs, you can now connect to the VPN, and you can rerun the script to add/remove clients or uninstall OpenVPN. ...

November 13, 2020 · 1 min · 74 words · Me

Lights: tobyj

Snowman: alikhalilifar

Tree: ssmkhrj