articles

How to setup Cloudflare CDN to your website

This tutorial will guide you to setup Cloudflare CDN to your website. This aims to share the knowledge about CDN and why you should use it. What is CDN and why should I use it? CDN (Content Delivery Network) is a system of distributed servers across the globe. Websites use CDN to minimize the distance […]

How to create an admin page for your WordPress plugin

In this tutorial, we are going to create an admin page for your WordPress plugin. If you are using some famous plugins such as Yoast SEO, you can see that they have their own admin menu page that can be seen in the WordPress sidebar menu. Step 1: Create a plugin file. We will create […]

How to upload files in WordPress programmatically

In this tutorial, we are going to upload files in WordPress programmatically. Maybe you have already seen PHP File Upload and it simply didn’t work. Even if it does work, it is not recommended to use it. We are going to create a simple plugin that will allow us to upload files programmatically. WordPress has […]

How to create custom WordPress shortcode plugin from scratch

In this tutorial, we would be creating a custom WordPress shortcode plugin. I assumed that you are already familiar with WordPress plugins. We know that the WordPress plugins are composed of PHP files that can be found in /wp-content/plugins/ directory. Step 1: Create a folder in the WordPress plugins directory. I would be creating a […]

How to create SEO friendly URL in PHP

In this tutorial, we would be creating a PHP function that will convert a string to create an SEO friendly URL that can be used on your website. We will also use some predefined PHP functions such as strtolower and preg_replace for this tutorial. The goal of this tutorial is to create an SEO friendly […]

How to insert data into WordPress database

To insert data into WordPress database, we have learned that you need to connect the database. If you don’t know how you can refer to the previous topic entitled How to connect to WordPress database. After a successful connection to the database, we should start by populating it with data. We will once again use the […]

How to connect to WordPress database

Connect to WordPress database using PHP and MySQL. In PHP you can connect and modify databases in which MySQL is the most popular database system for this. Database tables holds the data found in your website. Tables are collection of related data that consists of columns and rows. For you to be able to modify […]

How to generate a random string in PHP

In this tutorial, we would be dealing with str_repeat, str_shuffle, and substr to generate a random string in PHP. Random strings can be used in generating things that use random strings such as tokens, initial password, and some other things that need to be hard to guess. Step 1: Declare the string where you will […]