How to create a WordPress shortcode?

wordpress

WordPress Shortcodes allow you to extend the functionality of WordPress. Shortcodes are text within the square bracket. You can paste this shortcode on any page, post or widget. WordPress executes the PHP function associated with the shortcode and displays the result instead of the actual shortcode text. You can find more about WordPress shortcodes at […]

Read More…

Create Dockerfile From Image

Docker

If you have a docker image and don’t have the Dockerfile used to create the image, dfimage can help you re-create Dockerfile. To find information about an image, you can use the command “docker history IMAGE_ID”. History command will show all actions taken on the image, including the commands used. You can use this information […]

Read More…

Magento 1 Invalid Form Key

magento 1 login error

When login to Magento 1 Admin area, i get an error Invalid Form Key. Please refresh the page. This is because the value of web/cookie/cookie_domain set wrong. This should be the current domain name.

In this case, the domain name was different. To see the value, you can run

You can leave cookie […]

Read More…

Magento 1 Password Reset

To reset the password for the admin user in Magento 1 installation, go to phpMyAdmin, run the following SQL command.

In the above SQL command, replace PASSOWRD_HERE with your new password. If you don’t know Magento backend URL, you can find it in file app/etc/local.xml

In this case, Magento backend URL is yourdomain.com/2XwA5Vb6PW […]

Read More…

Display real time statistics with Logtop

Logtop is a real-time log analysis tool. It can be used to understand log files. The developer describes it as “Display real time statistics of whatever you want.”. You can pass any value to it, logtop aggregate the data and show it by the number of times the data appear. Most repeated items shows on […]

Read More…

MySQL 8 server requested authentication method unknown to the client

MySQL

On a server running MySQL 8 and PHP 7.3, I get the following error [email protected]:~$ php 1.php PHP Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password] in /var/www/html/1.php on line 6 PHP Warning: mysqli_connect(): (HY000/2054): The server requested authentication method unknown to the client in /var/www/html/1.php on line 6 Failed to […]

Read More…

Install Minikube with docker driver on Ubuntu

minikube docker provider

Minikube is a Kubernetes implementation for development and testing. By default, it uses Virtualbox. The newer version support docker driver, this allows you to use docker to run your minikube Kubernetes cluster. You can find documentation for minikube at https://minikube.sigs.k8s.io/docs/start/ First of all, we need to install Docker, for this, run the command. You must […]

Read More…

Find what MPM model Apache is using

Apache is the most popular web server, it is Open Source and modular. Multi-Processing Modules (MPM) in Apache decides how Apache listens to the network and handles the incoming requests. Apache have many MPM Modules (Multi-Processing Modules), the most popular among them are Prefork, worker, and Event. You can only activate one Apache MPM at […]

Read More…

ISPConfig how to rename web directory

ISPConfig

ISPConfig is a free hosting control panel. The DocumentRoot in ISPConfig is /var/www/clients/client0/web1/web. In the path client0 and web1 changes depending on number of customers and web site you have on the server. If you try to rename web foder, you get permission denied error, this is because ISPConfig set chattr +i (immune) to parent […]

Read More…