The process of installing WordPress plugins on a Linux server is not complicated. You can install it in several different ways. Here are some common installation methods.
Prerequisites
The Linux server has WordPress installed and can be accessed through a browser.
You have access to the server (via SSH connection, etc.).
PHP, MySQL, and Apache/Nginx are correctly configured.
Method 1: Install plugins through the WordPress admin backend
This is the easiest way to install WordPress plugins without directly operating server files.
1. Enter the WordPress backend
Access your WordPress website in a browser (for example: http://yourdomain.com/wp-admin) and log in with an administrator account.
2. Enter the plugin management page
In the WordPress backend, click Plugins in the left menu, and then select Install Plugin.
3. Search for plugins
On the Install Plugin page, you can find the plugin you need through the search box. Enter the plugin name or related keywords.
4. Install the plugin
After finding the plugin, click Install Now and wait for the plugin to install.
5. Enable the plugin
After the installation is complete, click Enable and the plugin will take effect, usually adding the corresponding settings page or function.
Method 2: Install by uploading the plugin
If you have downloaded a plugin file in .zip format, you can upload and install the plugin through the backend.
1. Go to the plugin management page
As with method 1. go to Plugins > Install Plugins in the WordPress backend.
2. Click Upload Plugin
On the Install Plugin page, click the Upload Plugin button at the top.
3. Upload the plugin file
Select the local plugin .zip file and click Install Now.
4. Enable the plugin
After the installation is complete, click Enable to activate the plugin.
Method 3: Manually install the plugin via SSH or FTP
If you prefer to use the command line or need to handle large-scale plugin installations, you can connect to the server directly via SSH or manually upload the plugin using an FTP client.
1. Connect to the server
Log in to your Linux server via SSH:
ssh user@your-server-ip
2. Download the plugin file
If you have the plugin's .zip file, you can download the plugin directly via wget or curl. For example, let's say you downloaded the Yoast SEO plugin:
cd /var/www/html/wp-content/plugins
wget https://downloads.wordpress.org/plugin/wordpress-seo.latest-stable.zip
3. Unzip the plugin file
Once the download is complete, unzip the .zip file:
unzip wordpress-seo.latest-stable.zip
4. Modify plugin file permissions
Make sure the plugin file permissions are correct so that the web server (usually www-data) can access it:
sudo chown -R www-data:www-data /var/www/html/wp-content/plugins/wordpress-seo
5. Enable the plugin
Once the file is uploaded, go to the WordPress backend and go to the Plugins page. You should see the newly uploaded plugin. Click Enable.
Method 4: Install plugins using WP-CLI
WP-CLI is a command-line tool for WordPress that allows you to quickly install and activate plugins through the command line, and even manage multiple plugins in batches.
1. Install WP-CLI
If WP-CLI is not installed on your server, you can install it with the following command:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
Verify that the installation was successful:
wp --info
2. Install plugins through WP-CLI
Use the following command in the root directory of WordPress to install the plugin. For example, install the Yoast SEO plugin:
cd /var/www/html
wp plugin install wordpress-seo --activate
This will automatically download and activate the plugin.
3. Check plugin status
You can also check whether the plugin has been successfully installed and enabled through WP-CLI:
wp plugin list
There are many ways to install WordPress plugins: directly through the backend, upload the plugin, and use the command line (SSH or WP-CLI). These methods have their own advantages and disadvantages, and you can choose the appropriate method according to your actual needs. The most common way is to manage through the WordPress backend because it is simple and intuitive, but if you need to manually install or batch manage plugins, using SSH or WP-CLI may be more efficient.