Kategorie: Linux

WP-CLI basic commands and examples

In the previous tutorial describing how to perform the installation of wp-cli on the server vps and today present ways to use it.
In a few seconds or install wordpress plugin.

wp-cli at ease working on the user account is not root. The first thing we'll do it or Open a log on the user selected by us.

I am doing this with root command :

su admin

admin is of course the user I am logging on to 🙂

the next step is to go to the directory where you want to make operation via wp-cli

cd /home/admin/domains/serwerweb.pl/public_html

Instant downloads wordpress !

If you want to download files instantly wordpress spend command:

wp core download --locale=pl_PL

public_html in our website will be uploaded to our wordpress already unpacked in the Polish version

wp core download --locale=pl_PL
Downloading WordPress 4.9.6 (pl_PL)...
Using cached file '/home/admin/.wp-cli/cache/core/wordpress-4.9.6-pl_PL.tar.gz'...
Success: WordPress downloaded.
admin@vps124:~/domains$ ls
default          wp-admin              wp-includes        wp-signup.php
index.php        wp-blog-header.php    wp-links-opml.php  wp-trackback.php
license.txt      wp-comments-post.php  wp-load.php        xmlrpc.php
readme.html      wp-config-sample.php  wp-login.php
suspended        wp-content            wp-mail.php
wp-activate.php  wp-cron.php           wp-settings.php

instantly truth?

I create a database in the panel DirectAdmin and doing a standard installation of wordpress.

Installing the plugin!

The prerequisite to install the plugin through the wp-cli, aby był on dostępny w ogólnej bazie pluginów – https://pl.wordpress.org/plugins/. Actions do the same for each plug. In this tutorial we will install the plug contact forms 7:

. Go to the WordPress directory for which you want to install the plugin

Grab the name of the plugin from URL: https://pl.wordpress.org/plugins/contact-form-7/ in the case of the plug contact forms 7 It is a contact-form-7

In SSH enter the following command:

wp plugin install contact-form-7.

If you want to install more than one plug, This type them in the spaces:

wp plugin install contact-form-7 jetpack

The plug is installed. After this message appears: Success: Installed 1 of 1 plugins.

Activations we installed the plugin using the command:

wp plugin activate contact-form-7

Plug the end of the run will be confirmed by an appropriate message Success: Activated 1 of 1 plugins

Update WordPress and plugins!

Step 1. Go to the directory with the installation of WordPress, for example:

cd /home/admin/domains/serwerweb.pl/public_html

Step 2. Check the version of WordPress in this catalog.

wp core version

Check for update:

wp core check-update

If you already know the update is, start it:

wp core update

2. See a list of plugins:

wp plugin list

The result will be a table with a list of plugins and information if there are any updates in the form of:
at:

+--------------------+----------+--------+---------+
| name               | status   | update | version |
+--------------------+----------+--------+---------+
| akismet            | inactive | none   | 3.1.11  |
| hello              | inactive | none   | 1.6     |
| wp-multibyte-patch | inactive | none   | 2.7     |
+--------------------+----------+--------+---------+

I recommend immediately update all:

wp plugin update --all

Of course, you can update only selected plug, for example.:

wp plugin update akismet

3. At the end of the translation update:

wp core language update

Linux

Udostępnij
Opublikowane przez
Linux

Recent posts

KeePass2 2.52 w Ubuntu 22.04

The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń

2 years temu

Installing Master PDF editor in Ubuntu 22.04

Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji

2 years temu

iotop - memory monitoring

Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w

2 years temu

Run multiple commands in one cron job

You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania

2 years temu

Changing the exif data of a photo in the Linux terminal

Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.

2 years temu

Installing Rocket.Chat Server on Rocky Linux 8

The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy

2 years temu