Tag: php

  • How Many Database Connections Does a WordPress Site Open? (Experiment & Analysis)

    How Many Database Connections Does a WordPress Site Open? (Experiment & Analysis)

    Have you ever wondered how many database connections a single WordPress request actually opens? Understanding this is crucial for scaling your site and preventing the dreaded “Error establishing a database connection.” In this article, we\’ll dive into the factors that influence these connections and perform a live experiment to verify the results.

    (more…)
  • How to Upload and Download S3 Files using Plain PHP (No SDK Required)

    How to Upload and Download S3 Files using Plain PHP (No SDK Required)

    I am familiar with typical cloud storage services like Google Drive and Microsoft OneDrive. However, in web development, these cloud storage providers are not quite suitable because they lack direct, permanent links to the uploaded files. To address this issue, object storage becomes a handy and reliable solution.

    (more…)
  • How to install IonCube Loader with FlyWP

    How to install IonCube Loader with FlyWP

    I heard FlyWP for the first time at WordCamp 2024 @ Menara Ken TTDI event. I give a try, and I immediately fall in love with this product. I was thinking that someone that build plugin for WordPress could be using IonCube to encrypt the source code.

    (more…)
  • PHP Send Duplicate Key in POST data

    PHP Send Duplicate Key in POST data

    Some Application Programming Interface (API) requires you to send multiple parameter with same key name. However, associative array in PHP only allow unique key name per each array. Subsequent assignment towards the same key will override the previously assigned values. Here is how to send duplicate key in POST data with PHP.

    (more…)
  • Adding imagick to PHP 7.4 and 8.1 on MacOS 12.6

    Adding imagick to PHP 7.4 and 8.1 on MacOS 12.6

    I’m currently preparing my brand new Macbook Air for WordPress plugin development. I have installed PHP 8.1 using homebrew, a well-known package manager for most software developers using Mac. After installing WordPress, I notice WordPress complained about missing imagick library. I tried to install but encountered an error.

    (more…)