The mention of the command line has left many developers with lingering fear, but the truth is that it is an easy-to-use tool that is very useful for development. Understanding the operation mode can simplify the use of the command line, simplify the operation and save a lot of time. This is the fourth post in a six episode series on WordPress for advanced developers. This series is a follow-up to the popular WordPress development for intermediate users, including details of theme development, theme customization preparation, plug-in construction, custom post types and classifications, query and circulation, custom fields and metadata, and localization. The
This guide will show you how to use the command line to perform regular tasks and make life easier. Note: PHP is the basic language of WordPress, a high-level theme for developers in this series, so you must have practical knowledge of PHP. In this series, see code snippets. What is the command line? There was no actual user interface before. You must use the terminal to run text-based commands to perform operations. There are no terminals recently. There is a highly integrated computer and terminal simulator that can execute commands using a graphical user interface. The
The command performs everything from zooming an image to creating a new file and switching between monitors. Any operation performed through the user interface may potentially be performed by commands executed by the terminal. What makes the command more useful is that you can combine multiple complex tasks to complete multiple tasks at once. At runtime, you can use existing commands to write very short scripts by trimming, optimizing, and then adding all images in the directory to a single zip file. Terminal required? The terminal does not need to be used before a specific point in time. You can complete complex tasks faster and make life easier. You will see the scenario of using the terminal later. The
A good example is to code anything on a node that needs to use SSH to access a remote server or NPM to install packages and execute commands. In short, although the terminal is not the requirement of WordPress development, it opens a new horizon, node. This is a very useful tool to help you prepare to work in languages such as JS. If you use UNIX based systems such as windows, UNIX, and OSX terminals Ubuntu, CentOS, or OSX, there is no need to worry about command line settings. Except for some minor differences that will not be encountered in a period of time, the commands are the same, and the operating system comes with many useful commands. The
Windows is another problem. For our purposes, the command prompt is far less useful than the terminal. We recommend that you install cygwin, which provides many useful commands in this tutorial. If installation requires assistance, check this convenient installation guide. Start: from the basic knowledge of the terminal, we assume that you have installed cygwin and can access most commands used by Linux and OSX users. When you run a terminal window, you will find that it contains a lot of information. Basic OSX terminal. Don’t worry about slightly different shapes. Still working well. The screenshot above shows the logged in user, the logged in computer, and the current directory. The
My user name is \