We do support Round the Clock 24 x 7 x 365 (+91) 883 012 3924
header-image

L3 Web Hosting Blog

cPanel, Plesk, Wordpress Hosting SSD disk

Check out L3WebHosting blog for tips and in-depth articles on web hosting services !!

How to Reset Admin Password for Joomla

Forgot the password for Joomla login ?  Don’t worry, we can reset the password with the below steps :

# First we need to know which database is used for Joomla.
So check the configuration.php  file to get database details.
It is located at the root directory of your Joomla installation, usually under  /public_html/ folder.

public $db = 'mysite_joomla';
public $dbprefix = 'jos_';

# Now login to cPanel server with root user and enter below commands

mysql
use mysite_joomla;
select * from jos_users;
UPDATE 'jos_users' SET 'password' = MD5( 'new_password' ) WHERE 'jos_users'.'username' = “admin” ;

Note : Replace “new_password” with your new joomla admin user password.

Now you can test the joomla password by logging into the Joomla administrator interface from: www.mywebsite.com/administrator .

 

How to Prevent Email Abuse on cPanel server

Here are some of the best practices that you can follow to avoid email abuse on your cPanel server.

# Password Strength Configuration :
If you increase the password strength, you can decrease the chance that a hacker will correctly guess passwords.

WHM >> Home >> Security Center >> Password Strength Configuration

# Enable cPHullk
If you enable cPHulk, you can decrease the chance that a hacker can use a brute force attack on your server.

WHM >> Home >> Security Center >> cPHulk Brute Force Protection

# SMTP restrictions
If you enable the SMTP Restrictions feature, spammers cannot directly interact with remote mail servers or work around mail security settings.

WHM >> Home >> Security Center >> SMTP Restrictions

# Max hourly emails per domain
This setting specifies the maximum number of emails that each domain can send per hour.

WHM >> Home >> Server Configuration >> Tweak Settings

# Prevent “nobody” from sending mail

WHM >> Home >> Server Configuration >> Tweak Settings

 

Availability of php extensions into cPanel WHM

Here is a good table which will show you the availability of php modules for particular PHP version on cPanel WHM server.

 

Module name PHP version Vendor Description cPanel Default profile Conflicts
5.4 5.5 5.6 7.0 7.1 7.2
bcmath

Docs Arbitrary precision mathematics

bz2

Docs Read and write bzip2 (.bz2) compressed files

calendar

Docs Calendar date manipulation

ctype

Docs Check character class

curl

Docs

Support for Curl (http, https, http/2, ftp, telnet)

Note:

You must install the mod_http2 Apache module for HTTP/2 support.

date

Docs Get the server date and time

dba

Docs Access DB-style databases

dbg

Docs PHP debugger

dom

Docs Document object module

enchant

Docs Spell check

ereg

Docs Regular expression match

exif

Docs Parse image metadata

fileinfo

Docs Content/Encoding detection

filter

Docs Filter data by validating or sanitizing

fpm

Docs FastCGI Process Manager

ftp

Docs FTP (File Transfer Protocol) support

gd

Docs Image functions (.gif, .jpg, .png)

gettext

Docs Native language support API

gmp

Docs GNU multiple precision

hash

Docs Message digest (hash) engine

iconv

Docs Character set conversion

imap

Docs Mail functions (SMTP, POP3, IMAP)

recode
intl

Docs Internationalization support

json

Docs JavaScript Object Notation (JSON)

ldap

Docs Lightweight directory access protocol

libxml

Docs XML library

litespeed

Docs

Litespeed SAPI

mbregex

Docs Disable mbregex support

mbstring

Docs Enhanced Chinese, Japanese, and other language support

mcrypt

Docs

Encryption support

Note:

In PHP 7.2 and later, the mcrypt module only exists as a PECL extension.

mhash

Docs Interface for the mhash library

mssql

Docs MSSQL® database access

mysql

Docs MySQL database access

mysqli

Docs MySQL improved database access

mysqlnd

Docs

MySQL native driver

Warning:

The mysqlnd module does not support old pre-MySQL 4.1 passwords.

odbc

Docs Unified ODBC

openssl

Docs OpenSSL library interface

pcntl

Docs Process control

pcre

Docs Perl-compatible regular expressions

pdo

Docs PDO database support

pdo mysql

Docs PDO MySQL support

pdo_odbc

Docs PDO ODBC support

pdo_pgsql

Docs PostgreSQL

pdo_sqlite

Docs Enable access to SQLite 3 databases

pgsql

Docs PostgreSQL DB support

phalcon

Docs Phalcon extension support

phar

Docs Disable Phar

posix

Docs Extended POSIX support

pspell

Docs Spell check

readline

Docs Interface for the GNU Readline library

recode

Docs Interface for the GNU Recode library

imap
Reflection

Docs Reverse-engineer classes, interfaces, functions, methods, and extensions

session

Docs Session support

shmop

Docs Shared memory segments

SimpleXML

Docs SimpleXML support

snmp

Docs SNMP (Simple Network Management Protocol) support

soap

Docs SOAP server and client support

sockets

Docs Raw socket support

SPL

Docs Standard PHP library

sqlite3

Docs SQLite version 3 database support

suhosin

Docs Improves the security of PHP installations

sysvmsg

Docs System V messages support

sysvsem

Docs System V semaphore support

sysvshm

Docs System V shared memory support

tidy

Docs

Tidy HTML formatter

tokenizer

Docs PHP tokenizer functionality

wddx

Docs WDDX support

xml

Docs XML support

xmlreader

Docs XML Pull parser

xmlrpc

Docs XMLRPC client and server support

xmlwriter

Docs XML writer extension

xsl

Docs XSL support

zip

Docs Read and write zip archives

zlib

Docs Read and write gzip archives

Remove .php extension with the help of .htaccess file

If you want user-friendly URLs on your site and hide .php extension then this post is useful for you.

Please follow below steps to hide .php file extensions :
# Open .htaccess file and add below rewrite rules

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [NC,L]

Now your server will remove .php file extension from all URLs
For example, http://example.com/file.php will become as http://example.com/file

Please also check https://www.l3webhosting.com/blog/remove-html-extension-with-the-help-of-htaccess-file/

Remove .html extension with the help of .htaccess file

If you want user-friendly URLs on your site and hide .html extension then this post is useful for you.

Please follow below steps to hide .html file extensions :
# Open .htaccess file and add below rewrite rules

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.html [NC,L]

Now your server will remove .html file extension from all URLs.
For example, http://example.com/file.html will become as http://example.com/file

Please also check: https://www.l3webhosting.com/blog/remove-php-extension-with-htaccess/

How to activate File Manager into Vesta Control Panel

Vesta control panel offers “Web File Manager” paid plugin.
With Vesta File Manager plugin, you can do list, copy, edit, view and retrieve all of your web domain files.

Follow below steps to install Vesta File Manager :

# Login to Vesta control panel with admin user
# Look for Server entry in the top menu
# Click the “Configuration” button
# Scroll down and choose the Vesta Control Panel Plugins link
# Look for File Manager entry
Choose YES from the drop-down menu
# Enter the License Key which you get from Vesta team
# Click the Save button.
# You will see “File Manager” new entry in the top menu

The File Manager interface looks like as below :


How to Reduce WordPress Admin Ajax Server Load

Sometimes wordpress admin Ajax script creates load on the server.
WordPress Heartbeat API was introduced in WordPress 3.6 version.
The WordPress Heartbeat API uses wp-admin/admin-ajax.php to run AJAX calls from the browser. The purpose of this API is to improve user session management, auto-saving, revision tracking.

However, sometimes it causes high CPU usage and crazy amounts of PHP processes.
For example, if you leave your wordpress dashboard open, it will keep sending POST requests on a regular interval, hence can cause the Heartbeat API to continually spawn PHP processes which uses CPU.

Heartbeat control wordpress plugin can help you fix this problem.
Follow the steps below to configure.

# Login to wp-admin of your website
# Install Heartbeat control plugin
# Go to Settings and click into “Heartbeat Control.”

# Under “Control heartbeat locations” you have a couple options, select any option as per your need

  • Use default
  • Disable everywhere
  • Disable on dashboard page
  • Allow only on post edit pages

# Then you can set frequency for the heartbeat polling.

Hopefully, it will take care of some of your problems.

How to block search bots from accessing your website

Robots.txt is a small text file which needs to create in the root directory of your website.
On cPanel server, you will need to put robots.txt fiile into /public_html/ folder.

It tells well-behaved crawlers whether to crawl certain parts of the site or not. The file uses a simple syntax to be easy for crawlers to put in place.

In order to block all bots from accessing your site, you need to create a robots.txt file with the following content:

User-agent: *
Disallow: /

To block all bots from accessing a specific folder, you should create a robots.txt file with the following content:

User-agent: *
Disallow: /folder/

You can create/modify the robots.txt file via File Manager in cPanel.

Useful Exim commands

Display the number of email messages in the queue

# exim -bpc

Display information about email messages in the queue

# exim -bp

Display a summary of messages in the queue

# exim -bp | exiqsumm 

Display Exim’s current activity

# exiwhat

Test Exim SMTP transaction

# exim -bh ipaddress 

Display Exim settings of your server

# exim -bP

How to enable the MySQL slow query log

You can use the slow query log to help determine which database queries take a long time to run. However, the slow queries can affect database performance and overall server performance.

Follow below steps to enable the mysql slow query log on your server :
# Login to SSH shell with root user
# vi /etc/my.cnf

# Add below lines under the [mysqld] section:

slow_query_log = 1
log-slow-queries = /var/log/mysql-slow.log
long_query_time = 2


Note : where long_query_time – time taken by an SQL query to be executed in seconds. If a query takes longer than the value specified, this query will be recorded in the slow query log file.

Note: In MySQL 5.7, the variable log-slow-queries is deprecated so use slow_query_log_file instead of log-slow-queries .

# Save and close /etc/my.cnf file.

# touch /var/log/mysql-slow.log
# chown mysql:mysql /var/log/mysql-slow.log
# service mysqld restart

You can test your log file is working by typing
# tail -t /var/log/mysql-slow.log