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
Read the rest

How to get list of users using Drush cli

Please try to use one of the following

drush users:list
drush user-list
drush uinf $(drush sqlq "SELECT GROUP_CONCAT(name) FROM users_field_data")
drush uinf $(drush sqlq "SELECT GROUP_CONCAT(uid) FROM users")
drush uinf $(drush sqlq "SELECT GROUP_CONCAT(name) FROM users")

Don’t forget about mysql prefix if any

cat sites/default/settings.php
Read the rest

How to edit exim.conf file on cPanel server and prevent it from overwriting

Here is how it works in other words plus example:

/etc/exim.conf – you can edit this file to keep some changes temporary, then restart exim to get them working. After /scripts/buildeximconf you changes will be reset.

/etc/exim.conf.localopts – its the same as WHM –> Exim Configuration Manager –> Standard options (Basic editor).… Read the rest

How to change WordPress main URL to new one

Using WP-CLI (preferred):

Enter folder where your WordPress is installed:

[email protected] [~]# cd ~/public_html

Create backup of your database:

[email protected] [~/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

[email protected] [~/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

[email protected] [/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;}
[email protected] [/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 play a m4a/mp3 file via html file

There is licensing issue playing m4a formats in modern browsers

So your browser’s console will generate something as the following:

Cannot play media. No decoders for requested formats: audio/m4a

Just use mp3, here is example:

Download mp3 sample and insert it into your html file:

wget https://file-examples.com/wp-content/uploads/2017/11/file_example_MP3_700KB.mp3
Read the rest

Configure CSF on CentOS 7

Install needful packages if you haven’t yet

yum install wget vim perl-libwww-perl.noarch perl-Time-HiRes -y

Download and install CSF

cd /usr/src/
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

Run test:

cd /usr/local/csf/bin/
perl csftest.pl

Disable default Centos 7 firewall if you have it installed

systemctl stop firewalld
systemctl disable firewalld

Disable testing mode

cd /etc/csf/
vim csf.conf
Read the rest

Xubuntu, fastboot, ADB and Redmi Note 7 adventures

Install adb and fastboot:

sudo su
apt-get update
apt-get install android-tools-adb android-tools-fastboot -y

Supposed your phone device bootloader is unblocked:

– Settings –> About Phone –> MIUI version and MIUI Version 7 Times
– Settings –> Additional Settings –> Developer Options and check “OEM unlocking” [should be already checked] and “USB debugging.”… Read the rest