First time, when I try to setup PHPUnit inside a WordPress plugin, it seems like I can not run test for this plugin. After spending more hours on it, now it seems like its so easy like create a plugin in WordPress. I have learned many things during this process. Like how to create a… Continue reading Setup PHPUnit in WordPress plugin with WP CLI
Month: October 2021
Run test command with composer
For PHPUnit test, you might have different version for your local dependency and global installation. You might have installed latest version of composer globally and older version of composer for you local project like me. For globally you can run phpunit command from your terminal. But for the local project with different dependency you can… Continue reading Run test command with composer
How to install PHPUnit on windows
Installing PHPUnit on Windows operationg system is really painful. I was thinking like the above line last 2 days, since I installed and run phpunit command globally. In order to install it on your local machine, you need to setup composer first. How to install composer on windows is not part of this tutorial. Thats… Continue reading How to install PHPUnit on windows
Setup WordPress using WP CLI
Setup WordPress using WP CLI is very comfortable who use WP CLI in their daily development process. At first you need to have WP CLI installed in you local machine. In order to check, run wp command inside your terminal. Here is what I got running wp command. Now its time play around. Open your… Continue reading Setup WordPress using WP CLI
Solve mysql is not recognized as an internal or external command
In command terminal of windows 10, mysql command is not rea By default windows 10 command terminal does not recognize mysql command. You need to add your server mysql path in you environment variable. Go to you server mysql path like mine. Add the above path in you environment variable. If you don’t know how… Continue reading Solve mysql is not recognized as an internal or external command
Get category details by term ID
In a day to day development process, we need to display category details inside a post card or something else. In order to get single category details by their term ID you need to pass ID in the get_term_by() WordPress function. Below is the example. You need to place single category ID inside that function.… Continue reading Get category details by term ID