惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
Y
Y Combinator Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
L
LangChain Blog
美团技术团队
N
Netflix TechBlog - Medium
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
博客园 - 司徒正美
爱范儿
爱范儿
D
DataBreaches.Net
月光博客
月光博客
U
Unit 42
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
MongoDB | Blog
MongoDB | Blog
腾讯CDC

Pressable

Pressable Achieves Secure Hosting Alliance Certification | Pressable How Pressable MCP Is Changing The Game For WordPress Agencies: A Live Breakdown With Matt Medeiros And Phill Clapham | Pressable April Product Update: Navigation, Organization, And Efficiency | Pressable White-Label WordPress Hosting For Profitable Agencies | Pressable A Guide To Client Onboarding For WordPress Agencies| Pressable WordPress Plugin Management For Scalable Agencies | Pressable WordPress Maintenance Contracts For Agencies: A Complete Guide | Pressable 6 Essential SOPs For WordPress Agencies | Pressable Pressable MCP: Control Your WordPress Hosting With AI. | Pressable WordPress Hosting Cost: Pricing Tiers And What To Expect | Pressable WordPress Performance Budgets: Setting And Monitoring Goals | Pressable WordPress Automation With No Code Automation Tools | Pressable Implement Single Sign-On (SSO) In WordPress | Pressable How To Build A Real Estate Site On WordPress | Pressable Headless WordPress Showdown: Next.js Vs Gatsby | Pressable How To Automate White-Label WordPress Hosting With WHMCS | Pressable Developer Toolkit Update: Automation & UI Enhancements | Pressable How To Build A DXP Platform With WordPress How To Boost WordPress Agency Client Retention: 4 Strategies White Label WordPress Admin For Agency Clients Performance Testing For WordPress Agency Client Sites Performance Testing For WordPress: A Framework For Agency Client Sites How To Upload A Video To WordPress | Pressable How To Mitigate The Impact Of AI Scraper Bots On WordPress Sites WooCommerce ERP Integration: Automate Your Back Office WordPress Personalization: How To Display Tailored Content To Visitors | Pressable WooCommerce Conversion Rate Optimization: A Data-Driven Approach How To Price Your Online Course: WordPress Monetization Guide 7 Ecommerce KPIs You Should Be Measuring | Pressable WooCommerce Vs. BigCommerce: Which Is Best For Your Business Needs? | Pressable WooCommerce Performance Troubleshooting: Diagnosing Speed Issues Step-by-Step | Pressable
Using SSH And WP-CLI To Manage Your WordPress Site | Pres...
Zach Wiesman · 2022-11-11 · via Pressable

Person drinks coffee with cat on shoulder, sitting near window with potted plant.

Ask Your Favorite AI

Copy the link to a markdown format of this article for ChatGPT, Claude, Gemini, or your favorite AI.

WordPress is incredibly easy to use, but for more advanced users clicking through all the different screens in the WordPress admin can be cumbersome. Those users may want to consider using SSH to manage their sites via the WordPress command line interface, WP-CLI.

This post covers the basics of SSH and WP-CLI, including who should use it, when it’s helpful, and advice on when to avoid it.

What is SSH?

Secure Shell, or SSH, is a protocol that allows you to connect to a web server. A shell is a computer program with a command line interface. Instead of controlling the web server with a typical graphical user interface, the user enters everything by typing commands.

To learn more about how to use SSH commands, consider these third-party resources:

To use SSH, you need a web host that supports it. Pressable offers SSH access to all customers. Follow these instructions for setting up your SSH credentials and accessing command-line tools.

What is WP-CLI?

WP-CLI extends the command line interface for managing your WordPress website. WP-CLI allows you to install and update your WordPress software as well as install and manage plugins and themes. Read the official WordPress documentation for WP-CLI for more information about all the available options.

To utilize WP-CLI, you’ll need SSH access and a server with WP-CLI installed. You can follow these instructions for installing the WP-CLI or ask your web host about it. WP-CLI comes pre-installed and enabled on all Pressable accounts.

When is WP-CLI Useful?

WP-CLI is most helpful when setting up a new site or troubleshooting a site error.

Using the WordPress Command-Line Interface to Set Up a New Site

You can install a new WordPress instance using the command line interface. Just follow these instructions. If you have Managed WordPress hosting, it’s likely easier and faster to set up a new WordPress installation using your hosting dashboard.

SSH access at Pressable is configured on a per-site basis. You’ll need to set up a new site before you get SSH access. Pressable clients don’t need to use the command line interface to install WordPress – use the MyPressable Dashboard instead.

Useful WP-CLI Commands for New Site Setups

WP-CLI helps during the setup of a new site by allowing you to install and activate themes and plugins.

wp plugin install

Use this command to install one or more plugins. Just list the plugin slug at the end. You can find the slug in the WordPress plugin directory. The slug is what comes after plugins/

WordPress Install plugin slug format

This command works with more than one plugin. You also can use it to install plugins from a local ZIP file or a URL to a remote zip file.

Add –activate to the end of the line to both install and activate the plugins.

This command is incredibly useful if you develop sites using the same set of plugins. You could install and activate your preferred starter pack of plugins with one line.

Learn more about the plugin install command.

wp theme install

The theme install line works the same way as the plugin line. You can download, install, and activate a plugin using the WordPress theme directory slug or a zip file.

Using these two lines together, a developer could install their preferred theme and plugins with just two lines.

Learn more about the theme install command.

Using WP-CLI to Troubleshoot Your Site

Every WordPress site owner and developer hates the 500 Internal Server Error. It’s like the blue screen of death for WordPress sites. WP-CLI is a way to troubleshoot your website when you don’t have access to the traditional WordPress admin.

WP-CLI Commands for Troubleshooting your Website

Use these commands to help identify and fix issues with your site.

wp php-errors

This command lists recent PHP errors. It’s a great starting point to see if there is a particular plugin or theme causing the issue.

wp plugin list

This command returns a list of all your installed plugins with their status and version. The list will also include the plugin’s slugs. Make note of the slugs to use them in other commands. Learn more about this command.

wp theme list

This command returns a list of all themes and their status and version. Again, make note of the theme slugs to use them later. Learn more about this command.

wp plugin deactivate

Think a plugin is causing a site error? Deactivate it using this command. Just add the plugin slug at the end of the line. It works the same way as the install command in that you can list multiple plugins in the same command. Learn more about this command.

wp –skip-plugins –skip-themes

If you’re encountering errors and can’t run any commands, use this command to skip loading any theme or plugin code. You can combine this command with others to skip over all plugins and themes, so you can deactivate a problematic plugin:

Learn more about identifying a plugin or theme conflict with the WP-CLI.

When to Avoid Using WP-CLI

WP-CLI and SSH, in general, are not beginner friendly. You could damage your site or accidentally delete important files if you don’t know what you’re doing. Even experienced users should consider backing up their site before using SSH commands to make changes.

Pressable clients should note that, due to the complex nature of SSH and WP-CLI, our team can’t provide extensive support for using these tools. You can use the Pressable Support Team to solve issues connecting via SSH, but we don’t offer support or guidance on using specific commands.

If you’re unsure about using SSH, consider making a copy of your site as a staging site. Your Pressable account includes free staging environments and you can test the SSH commands on the staging site before using them on your live site.

Making Developers’ Lives Easier

SSH and WP-CLI access are just another way Pressable supports developers. From advanced tools to an intuitive dashboard for managing multiple sites, Pressable delivers an elevated experience for hosting and managing WordPress websites.

Zach Wiesman

Zach brings a wealth of knowledge to Pressable with more than 15 years of experience in the WordPress world. His journey in WordPress began with creating and maintaining client websites, fostering a deep understanding of the intricacies and challenges of WordPress. Later, his knack for problem-solving and commitment to service led him to pursue a role at Automattic, where he excelled in providing customer support for WooCommerce. His expertise extends beyond technical proficiency to encompass a deep understanding of the WordPress community and its needs. Outside of work, Zach enjoys spending time with his family, playing and watching sports, and working on projects around the house.