Web development tutorials.
-
Backup MySQL Database In Terminal

Import MySql database records into an .sql file from the terminal using the MySql command mysqldump, it is a quick and easy way to backup MySql database records. Requirements: MySQL Command line terminal How to manually backup a MySQL database. mysqldump -uNAME -pPASSWORD DATABASE > database.sql Where. NAME = the user name who has access…
-
Change The Excerpt Limit In WordPress

Modify the default (55) maximum number of words in WordPress post excerpt. Set the length according to your needs using the add_filter filter hook. Requirements: WordPress functions.php file Step 1. Open the active theme’s functions.php file and create a function that will return the desired number of words for the post excerpt. In this example,…
-
Create An Image With PHP

With the help of the GD library, it is possible to create a JPG, GIF, PNG, and other image formats (Formats supported by GD) in PHP. Either output the generated image on a browser or to a file. Requirements: PHP ^7.2.0 PHP GD Library The first attempt is to create a JPG image and output…
-
Password Protect Your Apache Server

Protect a directory on an apache web server by adding a password that would require a user to authenticate themselves and thus would give them authorization to access a protected folder. Requirements: Apache HTTP Server ^2.4 .htaccess file The first attempt is to try to use the directory configuration file (.htaccess file) to make the…
-
Access MySQL DB using PDO in PHP

Most, if not all new PHP server installations now a days include the PHP Data Objects API (PDO_MySQL), this extension is recommended if there’s a chance of connecting to different DBMS (Database Management Systems) in the future. Because same functions will be used to issue queries and to fetch data, only a single API needs…