xmlrpc.php is part of wordpress. It is used for some API. This is used by hackers to bruteforce WordPress installations, that can cause high server load and slow server performance. On cpanel server, to prevent xmlrpc.php attack go to WHM > Service Configuration > Apache Configuration > Include Editor click on “Pre Main Include”, then […]
EasyEngine backup WordPress Database

EasyEngine run database of web sites in a Docker container. To take backup of MySQL database used by a WordPress website, you can run command
1 |
ee shell DOMAIN_NAME --command='wp db export' |
This will create database backup on document root of the web site. See EasyEngine […]
WordPress use CDN with out plugin

Content Devlivery Network (CDN) allow your web site to serve images from another domain or a sub domain. This speed up web site as your web server don’t need to serve images. Also browsers have a limit on number of parallel downloads from same domain. Having images on a differnt domain bypass this limitation of […]
WordPress Avada theme load fontawesome from old site

I have migrated a web site using Avada WordPress theme. Once site is migrated, i edited wp-config.php file and added following to avoid site getting redirected to old website url.
1 2 |
define('WP_HOME','https://www.newurl.com'); define('WP_SITEURL','https://www.newurl.com'); |
Now site works, but some of the resources are loaded from OLD site url, this breaks some of the icons. On Browser Developer tool […]
WordPress CLI
To install WordPress CLI, run following command
1 2 3 |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar mv wp-cli.phar /usr/local/bin/wp chmod 755 /usr/local/bin/wp |
To list all users in wordpress, run
1 |
wp user list |
To create an Administrator user, run
1 |
wp user create USERNAME_HERE USER@DOMAIN.EXTN --role=administrator --user_pass=PASSWORD_HERE |
[…]
WordPress debug

If you have a wordpress web site that give blank screen, you can add following to wp-config.php to enable displaying errors.
1 2 3 4 5 |
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', true ); @ini_set( 'display_errors', 1 ); define( 'SCRIPT_DEBUG', true ); |
This should be added above line
1 |
/* That's all, stop editing! Happy blogging. */^M |
https://wordpress.org/plugins/query-monitor/ https://wordpress.org/plugins/debug-bar/ […]
Ubuntu Apache Setup for WordPress

On a Fresh Ubuntu 18.04 server, run following commands to setup Apache, PHP and MySQL needed for WordPress installation. You can go to each file and manually run the commands if you want to see what commands are executed.
1 2 3 4 5 6 |
wget https://raw.githubusercontent.com/serverok/server-setup/master/ubuntu/1-basic-tools.sh wget https://raw.githubusercontent.com/serverok/server-setup/master/ubuntu/2-apache-php-mysql.sh wget https://raw.githubusercontent.com/serverok/server-setup/master/install/update-php-ini.sh bash ./1-basic-tools.sh bash ./2-apache-php-mysql.sh bash ./update-php-ini.sh |
At this stage, you have LAMP server setup and ready to go. To get your […]
Install WordPress in Kubernetes
To install WordPress in Kubernetes, you need to install helm package manager. Now run
1 |
helm install stable/wordpress |
After the helm chart is run, you will get commands to get login for WordPress admin area. Here is services it create
1 2 3 4 5 6 |
boby@sok-01:~$ kubectl get service NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.39.240.1 <none> 443/TCP 34m whopping-labradoodle-mariadb ClusterIP 10.39.248.140 <none> 3306/TCP 2m whopping-labradoodle-wordpress LoadBalancer 10.39.253.160 35.193.33.14 80:32054/TCP,443:30939/TCP 2m boby@sok-01:~$ |
List of all pods
1 2 3 4 5 6 |
boby@sok-01:~$ kubectl get pod NAME READY STATUS RESTARTS AGE ubuntu 0/1 Completed 0 21m whopping-labradoodle-mariadb-0 1/1 Running 0 3m whopping-labradoodle-wordpress-8bddb5fdf-2l24d 1/1 Running 0 3m boby@sok-01:~$ |
Deployments
1 2 3 4 |
boby@sok-01:~$ kubectl get deployment NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE whopping-labradoodle-wordpress 1 1 1 1 4m boby@sok-01:~$ |
To scale the deployment, run
1 2 3 |
boby@sok-01:~$ kubectl scale deployment/whopping-labradoodle-wordpress --replicas=2 deployment.extensions/whopping-labradoodle-wordpress scaled boby@sok-01:~$ |
See Helm Kubernetes Package […]
WordPress Backup and Migration Plugins

Migrate Guru: Migrate & Clone WordPress Free This plugin allow you to transfer your wordpress web site to another hosting for free. It support sites upto 200 GB in size. Use BlogVault to do the transfer. https://wordpress.org/plugins/migrate-guru/ All-in-One WP Migration This free plugin allow you to backup and restore your wordpress site. Free version support […]
WordPress CherryFramework lessphp fatal error

On a WordPress site using CherryFramework based theme, was getting following error.
1 2 |
lessphp fatal error: load error: failed to find /home/mediaxtreme/sitedomain.com/wp-content/themes/theme50607/bootstrap/less/bootstrap.lesslessphp fatal error: load error: failed to find /home/mediaxtreme/sitedomain.com/wp-content/themes/theme50607/style.less Warning: Cannot modify header information - headers already sent by (output started at /home/mediaxtre/public_html/wp-content/themes/CherryFramework/includes/less-compile.php:157) in /home/mediaxtre/public_html/wp-login.php on line 423 |
This was due the web site have migrated to a new server and the path in new server was differnt than old server. To fix, edited file
1 |
wp-content/themes/CherryFramework/includes/less-compile.php |
On line 157, you see following code
1 2 3 4 5 |
try { $less->compileFile($inputFile, $outputFile); } catch (Exception $ex) { echo "lessphp fatal error: ".$ex->getMessage(); } |
Replace ith with
1 2 3 4 5 |
try { $less->compileFile($inputFile, $outputFile); } catch (Exception $ex) { # echo "lessphp fatal error: ".$ex->getMessage(); } |
You will […]