How to work around “is not an EA4 SCL PHP” error

“ea-php72” is not an EA4 SCL PHP

Update both .bash_profile and .bashrc files under your home/ directory as following:

export PATH=/opt/alt/php72/usr/bin:$PATH
alias ea-php72="/usr/local/bin/lsphp"

Use a real path to your PHP binary file if its not yours /usr/local/bin/lsphp

Run to apply updates:

source .bashrc
Read the rest

How to remove mailman archives on cPanel server

Find your mbox files

ls -la /usr/local/cpanel/3rdparty/mailman/archives/private/my1_lists.domain.com.mbox/my1_lists.domain.com.mbox
ls -la /usr/local/cpanel/3rdparty/mailman/archives/private/my2_lists.domain.com.mbox/my2_lists.domain.com.mbox

Backup *.mbox files if needed and empty them:

truncate -s 0 /usr/local/cpanel/3rdparty/mailman/archives/private/my1_lists.domain.com.mbox/my1_lists.domain.com.mbox
truncate -s 0 /usr/local/cpanel/3rdparty/mailman/archives/private/my2_lists.domain.com.mbox/my2_lists.domain.com.mbox

Go to bin/ folder and wipe as following:

cd /usr/local/cpanel/3rdparty/mailman/bin

./arch --wipe my1_lists.domain.com
./arch --wipe my2_lists.domain.com
Read the rest

How to create a file of specific size using Linux command line

Reduce size using truncate command

Run for a second:

yes "some text" > testfile.txt

Reduce size using truncate:

truncate -s 50M testfile.txt

Create 50M file using fallocate command

fallocate -l 52428800 testfile.txt

To be more exact using inline arithmetic:

fallocate -l $((50*1024*1024)) testfile.txt
Read the rest

How to reinstall Softaculous on cPanel server

Backup settings files/folders:

rm -rf /usr/local/src/softaculous_settings_bk
mkdir -p /usr/local/src/softaculous_settings_bk
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/universal.php /usr/local/src/softaculous_settings_bk/
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/iscripts.php /usr/local/src/softaculous_settings_bk/
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/categories.ser /usr/local/src/softaculous_settings_bk/
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/conf /usr/local/src/softaculous_settings_bk/
cp -rp /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/enduser/hooks /usr/local/src/softaculous_settings_bk/

Do the re-installation:

wget -N http://files.softaculous.com/install.sh
chmod 755 install.sh
./install.sh --force-download

Restore your settings:

cat /usr/local/src/softaculous_settings_bk/universal.php
Read the rest

How to change WordPress main URL to new one

Using WP-CLI (preferred):

Enter folder where your WordPress is installed:

username@server1 [~]# cd ~/public_html

Create backup of your database:

username@server1 [~/public_html]# wp db export

The following command won’t do any change because of –dry-run key specified but show you tables and amount of replacement

username@server1 [~/public_html]# wp search-replace 'OLDdomain.com'
Read the rest

SitePad publishing issue after migration. Wrong FTP details error

To get it fixed your need to force SitePad re-create FTP credentials firstly

root@server1 [/home/someuser/.sitepad]# cat user.php
a:7:{s:25:"disable_all_notify_update";i:0;s:8:"timezone";i:0;s:6:"apikey";s:32:"zd1k52apam18404pdjg47uo2e8fiug1tzovjr8j";s:7:"apipass";s:32:"4xafz21nlx2nryars3cb7xgjr5x0sx1";s:8:"ftp_user";s:26:"[email protected]";s:8:"ftp_pass";s:12:"zReGgnq)W1n]-3-1";s:8:"ftp_port";i:21;}
root@server1 [/home/someuser/.sitepad]# mv user.php user.php_old

Now login customer’s cPanel –> SitePad.
You will see brand new interface seems as you never had SitePad’s website.… Read the rest

How to fix broken WordPress Elementor plugin

First of all create a backup of your website files/folders/database

cd ~/public_html

Rename broken plugin’s folder:

mv wp-content/plugins/elementor wp-content/plugins/elementor_old

Don’t worry, currently all settings are presaved in your database.

Now do reinstall of the Elementor plugin using wp-cli with –force:

wp plugin install elementor --force

Should be ok now!… Read the rest