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
Author: admin
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
Solve no such file or directory problem in WP CLI
We all are used to update all plugins and themes from the admin panel of our WordPress site. It’s so easy. Enter to your dashboard, open plugin page and update individual plugin. Update theme or plugin from WP CLI is also so easy. But at first time, most of the dev face some issue to… Continue reading Solve no such file or directory problem in WP CLI
Set up nvm in Windows 10
In order to use nvm you need to install in through .exe file. Here is the link to download nvm. Browse this link and download nvm-setup.zip file. Simply extract and install the exe file. Now playground is ready to play. In my case my node version was 12.18.2 . In my development process, there is… Continue reading Set up nvm in Windows 10
How to fix primordials is not defined
This primordials issue occurs when you have some different version for gulp and node. If you are using node 12 and gulp 3, then this problem happen while you automate your task. Here is the quick solution for you. If you are using yarn then add below snippet for in you package.json file and install… Continue reading How to fix primordials is not defined
How to create custom post type in WordPress
WordPress comes with some default post type. Those are reserved in WordPress. You can create your own post type. Creating a post type in WordPress is nothing but a simple block of code. You just need to define your post type name and some array or string of arguments to register custom post type.