Redirect a site to www using PHP

To redirect a site to url with www using PHP, you can use following PHP code

Add this code in your index.php file or another file included by index.php See Redirect […]

Read More…

Repair MySQL database with mysqlcheck

MySQL

To check and repair all databases in a database run

Forcefully optimize all tables, automatically fixing table errors that may come up.

To check all databases

To analyze all tables in all databases:

To repair all tables in all databases:

To optimize all tables in all databases:

See MySQL […]

Read More…

Easy Kubernetes setup on Ubuntu with microk8s

kubernetes

To install microk8s, run

Enable rules in firewall

Enable addons

To see status of current addons, run

Here is status for a defaul install

To see all pods/services/deploymens, run

To avoid typing microk8s before kubectl, run

You can add this to .bashrc to make it permanent. To run […]

Read More…

Install Elasticsearch 7 on Ubuntu for Magento 2.3

To install Elasticsearch, add the key

add apt repository

install elasticsearch with apt

Set elasticsearch to start on boot

Elasticsearch can be started and stopped as follows:

verify elasticsearch is running with

or with

if it fail to start, you can debug with

See elasticsearch […]

Read More…

Restart IIS from command line

restart iis from command line

To restart IIS from command line, click on start, search for “cmd”, right click on “Command Prompt” select run as Administrator. On the command prompt, run

Start IIS To start IIS from command line, run

Stop IIS

See IIS […]

Read More…

Vue.js

Vue.js is a popular javascript framework. To install Vue, you need Node.js installed.

Install Vue.js with

Verify Vue.js working with

To create a project, run

[…]

Read More…

How to Enable WordPress Toolkit in Cpanel/WHM

WordPress Toolkit

To install WordPress Toolkit in Cpanel/WHM, first install it with command

After installation, you will be able to see WordPress Toolkit in CPanel. You can enable/disable WordPress toolkit under Feature Manager in WHM.

How to install WordPress using WordPress Toolkit This video will show how to install WordPress using WordPress Toolkit in Cpanel […]

Read More…

How to install Imunify360 antivirus

Imunify360 is a security software that include antivirus, firewall, intruder detection and web application firewall (WAF). It can block attacks and malware uploads in real time. To start installation, run the following script with your activation key:

If you have an IP-based license, run the same script with no arguments:

See imunify […]

Read More…