• We have a 5 STAR service and only happy clients ! 5 Star Rating
  • sales@plothost.com
Featured post

HostAdvice Best Customer Service Award 2017

August, 2017 – We are happy to announce the new award received from HostAdvice: 

HostAdvice Best Customer Service Award – 2017

hostadvice-best-customer-2017

HostAdvice anonymously tested our services and based on their customer service experience, they awarded us this great award. This confirms once again the quality of support we offer to our clients.

Check the new award in our dedicated page for awards at https://www.plothost.com/awards/

Interested in our web hosting services? Check our shared hosting plans and reseller hosting plans.

Share this post:

Most used wp-cli commands

Probably the most used wp-cli commands are the core, plugin, theme. We will discuss a little each one of them. Before running any wp-cli commands be sure to switch to the right directory:
cd /home/wp_directory

1. wp core – it installs, updates and manages a WordPress installation.
– to download the installation package
wp core download --locale=en_US

– to create the wp-config.php file needed for the installation process
wp config create --dbname=database_name --dbuser=wp_username --dbpass=wp_password

– to install WordPress
wp core install --url=domain.com --title=Example --admin_user=supervisor --admin_password=strongpassword --admin_email=name@domain.com

– to check if an update is available:
wp core check-update

-to update to the latest version:
wp core update

2. wp plugin – manages plugins
– to activate a plugin
wp plugin activate plugin-name

– to deactivate a plugin
wp plugin deactivate plugin-name

– to delete a plugin
wp plugin delete plugin-name

– to install and activate a plugin
wp plugin install plugin-name --activate

– to list all plugins
wp plugin list

– to update all plugins
wp plugin update --all

3. wp theme – manages themes
– to install the latest version of a theme and activate it
wp theme install twentynineteen --activate

– to activate a theme already installed
wp theme activate twentynineteen

– to get a list of the installed themes
wp theme list

– to update all the themes installed
wp theme update --all

Related articles:
How to install wp-cli on your server

References:
WP-CLI Commands

Share this post:

How to install wp-cli on your server

WP-CLI is a command-line interface for WordPress.  Through it, you can manage your installations from the command line.

Official requirements you should check prior to installing WP-CLI:

– UNIX-like environment (OS X, Linux, FreeBSD, Cygwin); limited support in Windows environment
– PHP 5.4 or later
– WordPress 3.7 or later. Versions older than the latest WordPress release may have degraded functionality

The first thing we must do is to download the wp-cli phar file. As root, use the command:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

root@web [/]# curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5294k 100 5294k 0 0 8635k 0 --:--:-- --:--:-- --:--:-- 8637k
root@web [/]#

Now, let’s check the phar file is in good condition and to get some info about the wp-cli. Use:
php wp-cli.phar --info

root@web [/]# php wp-cli.phar --info
OS: Linux 2.6.32-042stab134.3 #1 SMP Sun Oct 14 12:26:01 MSK 2018 x86_64
Shell: /bin/bash
PHP binary: /opt/cpanel/ea-php73/root/usr/bin/php
PHP version: 7.3.4
php.ini used: /opt/cpanel/ea-php73/root/etc/php.ini
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.1.0
root@web [/]#

We want to use the wp-cli tool with the “wp” command so let’s run the commands:
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

The first command makes the file executable, the second one moves it to /usr/loca/bin/wp folder.

Everything is done now, let’s test it. Use:
wp --info

root@web [/]# wp --info
OS: Linux 2.6.32-042stab134.3 #1 SMP Sun Oct 14 12:26:01 MSK 2018 x86_64
Shell: /bin/bash
PHP binary: /opt/cpanel/ea-php73/root/usr/bin/php
PHP version: 7.3.4
php.ini used: /opt/cpanel/ea-php73/root/etc/php.ini
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.1.0
root@web [/]#

If you are running cPanel on the server, the wp-cli tool is already installed in /usr/local/cpanel/3rdparty/bin/wp. Many times, 3rd party apps are not updated frequently, so you may want to install wp-cli manually, as described above.

 

To update the wp-cli tool, use:
wp cli update

root@web [/]# wp cli update
Success: WP-CLI is at the latest version.
root@web [/]#

Thank you.

Related articles:
Most used wp-cli commands

Resources:
https://wp-cli.org/
https://wp-cli.org/#installing

Share this post:

Invalid license file: cPanel & WHM

During a cPanel update, web hosting users may get the following warning:

“Invalid license file: cPanel & WHM cannot verify your license during the upgrade process. Wait five minutes, and then try again.”
To access the interface, you must install the license and ensure that the license is active.

This server does not have a valid license. To address this issue, you must contact your hosting provider.

After you successfully activate the license, try login again in a few minutes the page and the message will no longer display.

This does not represent an issue on the server – it only means there is an outgoing update on the server. As the message suggests, wait 5-10 minutes and try to access your cPanel account again.

cpanel - invalid license file

Share this post:

WordPress Automatic Updates

Many users are asking us how to enable automatic updates in WordPress. For the moment, there is no option in the WordPress admin panel. You must enable this option by editing the configuration file – wp-config.php.

wordpress autoupdate

The line that needs to be added to the bottom of the wp-config.php file to enable automatic minor and major updates is:

define( 'WP_AUTO_UPDATE_CORE', true );

More info on the WP_AUTO_UPDATE_CORE option from the WordPress site:

WP_AUTO_UPDATE_CORE can be defined with one of three values, each producing a different behavior:

Value of true – Development, minor, and major updates are all enabled
Value of false – Development, minor, and major updates are all disabled
Value of ‘minor’ – Minor updates are enabled, development, and major updates are disabled

Notice: The WordPress will update itself to a development release ONLY if you already are using such a release.

The video tutorial for this article:

References:
https://codex.wordpress.org/Configuring_Automatic_Background_Updates

Share this post:

The mysql_upgrade command [MySQL/MariaDB]

It is recommended to run this command every time to update your MySQL/MariaDB from one major release to another. For example when upgrading from MySQL 5.7 to MySQL 8; MariaDB 10 to MariaDB 11. It checks all the databases(with all the tables) for any incompatibilities. It also updates the system tables with new privileges or options that might have been added in the new version.

The command with options is:

mysql_upgrade [--force] [--user=# --password
--host=hostname --port=# --socket=#
--protocol=tcp|socket|pipe|memory
--verbose] OTHER_OPTIONS]

Simply run the command in shell:

root@www [/home]# mysql_upgrade

References:

https://mariadb.com/kb/en/library/mysql_upgrade/

https://dev.mysql.com/doc/refman/8.0/en/mysql-upgrade.html

Share this post:
Page 1 of 51
1 2 3 51
back to top