Hunk » Foreign trade station construction » Wordpress » How to prevent WordPress from being hacked

How to prevent WordPress from being hacked

Website security is a major concern of many foreign trade friends. We have worked hard to build a website. If it is hacked, it is really painful. Today we will talk about how to prevent wordpress websites from being hacked

1. Choose a good space

Good space is very important. Like the siteground, I used it without any problems. Customer service is very good and fast. It is worth recommending.

The LINODE host is also good. I have used it for several years without any problems. I have used it myself for one year. It has been very stable and fast. For purchase, please refer to Three step purchase of Linode host (including Linode discount code)

2. Backup website

The website can only be prevented from being hacked, and the most important thing is backup. When the website is completed, it is very important to keep a certain frequency of backups. In case of blackout, you can also use the backup data to restore the website to minimize the loss. Recommended Backup the website with the replicator

If the website is updated frequently, it should be backed up once a week. If the website is not updated much, it can be backed up once a month. Specific frequency

3. Wordpress background account password setting is complex

Many friends like to use admin or email as their background account directly. The password is 123456 or other commonly used passwords, which are easy to crack. One way to get hacked is to hit the database. When your password in other places is leaked, it will be used to test your account on other platforms. So in order to avoid this situation, the account and password must be set uniquely. The more complex the better

4. Do not install unknown plug-ins or plug-ins that have not been updated for a long time

There are many plug-ins that have not been updated for several years. It is recommended not to install such plug-ins, because they may have many vulnerabilities, which will create opportunities for criminals.

The other is plug-ins that need to be paid, but some websites provide them for free, which may also be linked with virus programs or black chains, directly affecting the security of websites. (Hunk experience)

Plug ins for temporary use, such as website backup plug-in, should be deleted in time after use

5. More computer antivirus

When using FTP, if the local computer is poisonous, the virus may spread to the space through FTP, so the local computer must ensure security before using FTP

6. Lock the WP background

This method is learned from the God of Materials. The operation is as follows

1) Enter FTP (if Bluehost or siteground is used, file manager can also be used), download the functions.php file in the theme folder to the local, and back up one

 Wp how to prevent from being black2
2) Open functions.php with notepad++or DW, and paste the following code at the end

function login_protection(){
if(($_GET[‘admin’] != ‘abc’)) header(‘Location: http://go.liaosam.com/ ’);
}
add_action(‘login_enqueue_scripts’,’login_protection’);

 Wp how to prevent being black1

And replace abc with your background account, then save and upload it to the space to replace the old functions.php

3) Then you can only use www.domain.com/wp-login.php? Admin=abc comes to visit the background of your website. If you make a mistake, you will jump to go.liaosam.com. Of course, you can change go.liaosam.com to the website you want

7. Change the SSH port from the VPS space of the website

Often, after adding a new space in the Linode background and configuring it, you will be prompted how many attempts to log in to SSH. These are hackers trying to log in to the space.

If your website uses VPS such as linode, you must change the SSH port. In addition, change the root password more complex, so it is not easy to be hacked.

If your website has been hacked, you can refer to [Example analysis] What if the website is hacked?

Scan and share the circle of friends

 How to prevent WordPress from being hacked

Follow Hunk WeChat official account

Hunk has entered the foreign trade industry for 10 years, engaged in foreign trade business, and transformed technology for 12 years, engaged in foreign trade station building marketing. If you are going to build an independent foreign trade station, we have many professional technical articles for your reference. Hunk recommends Purchase domain name on namesilo , on siteground or cloudways Buy space on and use Google email. Of course, if you are not good at technology and have no time to study, you can find Hunk outsource to build a website or pay for solving problems

A reply on "How to prevent WordPress from being hacked"

Post reply

Your email address will not be disclosed. Required items have been used * tagging

-->