PHP / Magento Dev Blog

  • Home

Magento 2 bot attack on admin panel – brute force and protection

  • 0
Henryk Tews
Wednesday, 24 June 2026 / Published in Magento / Adobe Commerce

Server overloaded, nginx logs full of requests to /admin. Bots tried to log into the admin panel for 72 hours – 50,000 attempts. One admin account had a weak password. Response time: 30 minutes, hardening: 2 hours.

(more…)

Custom Payment Method in Magento 2 – authorize, capture, refund, webhook

  • 0
Henryk Tews
Wednesday, 24 June 2026 / Published in Magento / Adobe Commerce

A custom payment method in Magento 2 is one of the more complex modules to write from scratch. It requires implementing the MethodInterface, configuration in system.xml, JS templates for checkout, and handling return webhooks from the gateway. I show the complete module structure integrating a fictional payment gateway – from authorisation through capture to refund handling.

(more…)

Magento 2 reindexing takes hours – MySQL deadlock and missing indexes

  • 0
Henryk Tews
Sunday, 21 June 2026 / Published in Magento / Adobe Commerce

A shop with 50,000 products – full reindex took 6 hours and often ended with a deadlock error. Product prices and availability were updating with a delay. Fix time: 1 day.

(more…)

Magento 1 to Magento 2 migration – SEO data loss and 301 redirects

  • 0
Henryk Tews
Friday, 19 June 2026 / Published in Magento / Adobe Commerce

After migrating from Magento 1 to Magento 2, the shop lost 60% of organic traffic within 2 weeks. Ahrefs showed 4000 404 errors. Old product and category URLs were not being redirected. Fix time: 3 days.

(more…)

Chain of Responsibility – multi-step validation, pipeline, middleware

  • 0
Henryk Tews
Wednesday, 17 June 2026 / Published in Wzorce projektowe

Chain of Responsibility is a behavioural pattern in which a request passes through a chain of handlers – each can handle it, modify it, or pass it on. Ideal for multi-step validation, data processing pipelines and middleware. In Magento 2 this pattern is everywhere – in plugins, order pipelines and HTTP request handling. I show an implementation from scratch and three different chain variants.

(more…)

Magento 2 checkout – Place Order not working, cart resets

  • 0
Henryk Tews
Wednesday, 17 June 2026 / Published in Magento / Adobe Commerce

Customers reported they couldn’t place orders – clicking “Place Order” reloaded the page and the cart was empty. Orders were not reaching the system. The problem only affected card payments, bank transfer worked. Resolution time: 4 hours.

(more…)

Magento 2 loading slowly – N+1 problem and collections without limit

  • 0
Henryk Tews
Sunday, 14 June 2026 / Published in Magento / Adobe Commerce

The category page took 18 seconds to load with 200 products. PageSpeed score: 12/100. The problem was not the server or Varnish – it was in a module’s code that executed a separate SQL query for every product.

(more…)

Magento 2 500 error after update – vendor/autoload and dependency conflicts

  • 0
Henryk Tews
Friday, 12 June 2026 / Published in Magento / Adobe Commerce

The shop stopped working immediately after running composer update. White screen or 500 error on the front and admin, logs full of PHP Fatal Error messages. Resolution time: 2 hours.

(more…)

Warden vs DDEV – comparison 2026: architecture, performance, Magento 2

  • 0
Henryk Tews
Wednesday, 10 June 2026 / Published in Środowiska

Warden and DDEV are the two most popular local development environment tools for Magento 2. DDEV focuses on simplicity and fast start – it works out of the box after installation. Warden gives full control over network configuration and certificates, but requires more knowledge of Docker Compose. In 2026 both are mature products. I show where each one shines and when to choose which.

(more…)

PHP Enums advanced – backed enums, methods, interfaces, Magento 2

  • 0
Henryk Tews
Wednesday, 03 June 2026 / Published in PHP

Enums arrived in PHP 8.1 and are much more than a typed list of constants. Backed enums with string or int values, methods on enums, interface implementation, cases as function arguments – these are tools that eliminate an entire class of errors related to magic strings and unvalidated values. I show all the capabilities with practical examples from Magento 2.

(more…)

  • 2
  • 3
  • 4
  • 5
  • 6

© 2026 Created by

TOP
Zarządzaj zgodą
Aby zapewnić jak najlepsze wrażenia, korzystamy z technologii, takich jak pliki cookie, do przechowywania i/lub uzyskiwania dostępu do informacji o urządzeniu. Zgoda na te technologie pozwoli nam przetwarzać dane, takie jak zachowanie podczas przeglądania lub unikalne identyfikatory na tej stronie. Brak wyrażenia zgody lub wycofanie zgody może niekorzystnie wpłynąć na niektóre cechy i funkcje.
Funkcjonalne Always active
Przechowywanie lub dostęp do danych technicznych jest ściśle konieczny do uzasadnionego celu umożliwienia korzystania z konkretnej usługi wyraźnie żądanej przez subskrybenta lub użytkownika, lub wyłącznie w celu przeprowadzenia transmisji komunikatu przez sieć łączności elektronicznej.
Preferencje
Przechowywanie lub dostęp techniczny jest niezbędny do uzasadnionego celu przechowywania preferencji, o które nie prosi subskrybent lub użytkownik.
Statystyka
Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do celów statystycznych. Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do anonimowych celów statystycznych. Bez wezwania do sądu, dobrowolnego podporządkowania się dostawcy usług internetowych lub dodatkowych zapisów od strony trzeciej, informacje przechowywane lub pobierane wyłącznie w tym celu zwykle nie mogą być wykorzystywane do identyfikacji użytkownika.
Marketing
Przechowywanie lub dostęp techniczny jest wymagany do tworzenia profili użytkowników w celu wysyłania reklam lub śledzenia użytkownika na stronie internetowej lub na kilku stronach internetowych w podobnych celach marketingowych.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Zobacz preferencje
  • {title}
  • {title}
  • {title}