How to Change Composer Global Package Install Folder in Windows

Dependency Manager for PHP

Composer a tool for dependency management in PHP that allows you to declare the libraries your project depends on and also manages (install/update) them for you. On Windows, when global install of a library / package is done, composer stores the package in a Composer directory inside windows application data folders which by default is C:\Users\{user name}\AppData\Roaming. Mind you, this folder is hidden, thus you will have to enable … [Continue reading]

SQL to Update Multiple Database Table Columns With a Custom Value

Sample database structure

On a recent project, I needed to populate a newly created column added to an existing database table with over 10 rows of record with a custom values and I'm going to show us how I did it. Take for example, a database table that previously consisted of three columns and an additional handler_structure column was added to it via the SQL below. [crayon-56538b9bda4e1444801020/] Notice the handler_structure columns for all row records are … [Continue reading]

How to Reset a WordPress User Password hosted on Localhost

How to Reset a User WordPress Password hosted on Localhost

While working on a WordPress site hosted on a developmental server (simply called, localhost) in my computer, I mistakenly updated my admin password to a random WordPress generated one. Thus, I was logged out and no longer was able to log in again because I have no record of the new password. Using the password reset option won't work because email can't be sent on a local server (at least in mine). In this concise tutorial, I will show … [Continue reading]

How to fix “Warning: An existing WordPress network was detected.”

How to fix "Warning: An existing WordPress network was detected."

While converting a WordPress single install to multisite, the following error notice was displayed at the Network Setup admin page. Warning: An existing WordPress network was detected. It took me quite some time to finally figure out what I was doing wrong. Mind you, the instruction in Network Setup page clearly stated that the PHP constant definition below should be placed before /* That’s all, stop editing! Happy blogging. */ in … [Continue reading]

How to Destroy a User Session in WordPress

How to Destroy the Session of a Logged in User in WordPress

Below is a PHP function that can programmatically logout or destroy a user session in WordPress taking the user ID as an argument. [crayon-56538b9bda9f3772606021/] … [Continue reading]

How to Fix Size of XAMPP Installation Folder Getting Bigger

Folder eating up my local drive disk space

In a previous post, i showed us how to find and delete files eating up a PC disk space and in it, we could see that XAMPP was the largest consumer of my PC disk space. One might wonder, how the heck did XAMPP consume such large a size of disk space? turned out if you have xdebug profiling enabled, runtime information about the PHP scripts you execute are written into systems temp folder (by default) which is XAMPP tmp folder in my … [Continue reading]

Better Free Downloads In Easy Digital Downloads Powered Store

EDD License Free Download

If you sell digital products such as WordPress plugins and themes, you agree with me that Easy Digital Downloads (simply EDD) plugin is arguably the best to set up a store for selling. I use it in selling my premium plugins and couldn't be happier. A month ago, I release an extension for EDD called License Free Download that allow shop owners to give free downloads to customers that holds a license for another product. We use the … [Continue reading]