WordPress settings are early learning and are not considered in practice. It becomes second nature. The complete professional installation and configuration may be much longer than the famous 5-minute installation! From htaccess security to automated deployment, we’ll show you some amazing ways to create a word press environment for professionals. Let’s look at various ways to create a WordPress installation WordPress installation to solve this problem. 5-minute installation the famous 5-minute installation will last forever. This includes: The
Word press zip file upload decompression database table generation configuration file generation installation run for details, please refer to the word press Codex installation page. This method is not a problem, but it may be slightly complex and inconvenient for some people. Example: not all hosts have GUI tools to extract files from the server. In this case, the FTP client cannot decompress, so SSH access must be used. Another option is to upload the decompressed file, which takes longer than ever. I think we can do better. The
Terminal installation you know it is coming, terrible terminal! If Linux or Mac is used, the terminal can perform the above operations; for windows, putty must be used. The first step is to import all word press files. The following code looks long, but in addition to the first two lines, you can copy and paste, so you can get all the files you need in seconds. SSH [email Protected]
CD \/path\/to\/installation\/directory
WGet http:\/\/wordpress.org\/latest.zip
Unzip latest Zip
MV wordpress\/*\/
Rmdir WordPress
RM latest Zip
If you connect to the server through SSH and change the directory, use the WGet command to the latest version of WordPress. Then unzip. Because all files are stored in the WordPress subdirectory, all files must be moved to the parent directory. Then delete the unneeded subdirectories and source zip files to complete the operation. The
At this point, you can set up the database in cPanel and edit the configuration file using the FTP editor, but let’s see how the terminal can also perform all these operations. Let’s look at the database. MySQL -u username -p
If you enter this line (replacing \
The last step is to create a configuration file. You can do this by copying or moving the sample file and editing it with vim. I like to move files and do not need to archive them, because I will delete the sample files. The
MV WP config sample PHP WP config PHP
VI WP config PHP
If you are not familiar with VIM, it is recommended that you review the basic information. I don’t use it very often, but as long as I know the least about file browsing and editing, I can save a lot of time when working on a remote server. Very simple: click I to enter insert mode. Use the arrows to navigate and edit as needed. When you are finished, press ESC, enter: WQ, and press enter. Save and exit. All tasks have been completed. Although the instructions take time, the actual installation of one or more times is much faster than the installation of five minutes
whole At a minimum, you can save time switching to multiple tools. The
Wp-cli wp-cli can be used for many purposes, so it will appear in many tutorials! Wp-cli is a command line tool that can interact with the word press environment. This includes everything from creating 100 test users in one line of code to installing and updating word press. The wp-cli installation guide is not difficult and can be completed with just a few terminal commands. After the installation is complete, you can start running commands. Connect to the server using SSH and navigate to the installation directory. WP core
WP core config –dbname=yourdb –dbuser=yourdbuser –dbpass=yourdbpass –dbhost=youdbhost –dbprefix=yourdbrefix
WP DB create
WP core install–url=yoursiteurl–title=sitetitle-admin_username–admin_password=password–admin_email=yourmail is all. The WordPress website is now fully installed and configured. Wp-cli is my method of choice for installing plug-ins and performing other modifications in posts. The
To make the configuration site more secure and provide better performance, you can perform a variety of operations during pre installation and installation. Here’s a list of my favorites. The options here do not end. Unpredictability is a good way to avoid many security problems. Do not leave the database prefix \
Hackers cannot directly access your site, so they do not know what your user name is, and therefore do not know the database prefix, etc. All they can do is expect you to use the default values. The following is a list of changes made to make the site more secure. My database prefix is usually the same as the mini password. Use \
Set the contents of the firewall to in the root directory. Just paste it into the htaccess file# 6G blacklist\/firewall (beta)
#The@ http:\/\/perishablepress.com\/6g-beta\/
#6g:[request strings]
Male
Redirectmatch 403 \/ (\$\*) \/$
Redirectmatch 403 (? I) (male: |; |\’124;\s)
Redirectmatch 403 (? I) ([a-za-z0-9]{18})
Redirectmatch 403 (? I) (HTTPS? FTP? PHP) \:\/
Redirectmatch 403 (? I) (\ \
Redirectmatch 4
This is a good choice. Are you interested in all-in-one SEO PACl? ithemes security androg ithemes security (formerly known as better WP security) is an additional security layer for installing WordPress. It is very excellent. You can change the URL of the management zone, monitor changed files, search for vulnerabilities, and so on. Are you interested in ithemes security? plug-ins install WordPress administrators can install these plug-ins, but this is very wasteful. Not only do you have to wait until each installation is complete, but you also have to search for each plug-in and navigate multiple pages for each installation process. Wp-cli makes this easier. Here is a command to install all the plug-ins above. WP plugin install amazon-s3-and-cloudfront Akismet W3 total cache jetpack vaultpress Google sitemap generator limit login attempts
Let’s take a look at how to automate this using bash scripts. The bash script uses wp-cli to handle word press installation (plug-ins and everything). The htaccess file will also be created. Create the \
#Setup variables
Dbname=mydatabase
Dbuser=databaseuser
Dbpass=dnpass
Dbhost=localhost
Dbprefix=c8v8d2_eomgf_
URL= http:\/\/urlofsite.com
Title=sitetitle
Adminuser=danielpataki
Adminpass=mypassword
[email Protected]
Repoplugins=& Amp; Amp; Quote; Amazon-s3-and-cloudfront w3-total-cache jetpack vaultpress Google sitemap generator limit login attempts& Amp; Amp; Quote;
#Create htaccess file with firewall
Cat > Htaccess male
Redirectmatch 403 \/ (\$\*) \/$
Redirectmatch 403 (? I) (male: |; |\’124;\s)
Redirectmatch 403 (? I) ([a-za-z0-9]{18})
Redirectmatch 403 (? I) (HTTPS? FTP? PHP) \:\/
Redirectmatch 403 (? I) (\ \
Redirectmatch 403 (? I) (\=\\\=\%27\\/\\\\\\\\\\
Redirectmatch 403 (? I) \/ (author\-panel|submit\-articles) \/$
Redirectmatch 403 (? I) \/ (([0-9]{5}) | ([0-9]{6})) \ – ([0-9]{10}) \ (gif|jpg|png)
Redirectmatch 403 (? I) (\, |\/\/\) \ +|\/\, \/\{0\}\ (\/ \ (124\.\.\+\+\+\\\\\
Redirectmatch 403 (? I) \/uploads\/ ([0-9]+) \/ ([0-9]+) \/ (cached | cached | WP opt | WP supercache) \ PHP
Redirectmatch 403 (? I) \ (ASP | bash | CFG | CGI | DLL | exe | git | Hg | ini | JSP | log | MDB | out | SQL | SVN | SWP | tar | RDF | well)
Redirectmatch 403 (? I) \/ (^ $| 1 | addlink | BTN | u how | contact | dkscsearch | dompdf | easyboard | ezooms | formvars | fotter | FPW | I | imagemanager | index1 | install | iprober | legacy\-common