Skip to main content
MotherHosting

Keep your WordPress site secure: habits that work

WordPress security is mostly a matter of habit. Keep everything updated, use few and trusted plugins, choose strong passwords, limit admin accounts and make your own copy before every big change.

MotherHosting 5 min read

WordPress runs a very large number of websites, and that makes it interesting to attackers. Hardly any of them choose a site by hand. Automated programs go from address to address, try known weaknesses and common passwords, and move on. A small site is tested just like a large one.

No habit makes a website impossible to break into, and anyone who promises that is selling something. But a handful of plain habits close the doors these programs try first. Most of them cost nothing except a few minutes a week.

It also helps to know who looks after what. On web hosting, the server and its software are looked after for you. What runs inside your site is yours: WordPress itself, the theme, the plugins and the people who can sign in.

1. Keep everything updated

Updates are the most important habit. Many of them repair security faults, and once a repair is published, the fault it fixes is public knowledge. A site that stays on the old version is then an easy target.

  • Open Dashboard → Updates at least once a week and update WordPress, your plugins and your themes.

  • Leave the automatic installation of maintenance and security releases switched on; WordPress does this by default.

  • On the Plugins screen you can enable auto-updates plugin by plugin. It is a sensible choice for plugins you trust.

  • Replace a plugin or theme whose author has not updated it for a long time. Abandoned code does not get repaired.

2. Few plugins, from trusted sources

Every plugin is program code that runs with full access to your site. The fewer you have, the less there is to go wrong.

  • Install only what the site really needs. Before adding a plugin, ask whether WordPress or your theme can already do the job.

  • Take plugins and themes from the official WordPress.org directory or from the developer's own website.

  • Before installing, look at when the plugin was last updated and whether it has been tested with your version of WordPress.

  • Never install a paid theme or plugin that someone offers free of charge on another site. Such copies are a well-known way of carrying hidden harmful code.

  • Delete what you do not use. A plugin that is only deactivated still has its files on the server, and those can still be attacked. Keep your active theme and one default theme, and remove the others.

3. Strong passwords and careful sign-in

  • Use a long password that you use nowhere else. A password manager remembers it for you.

  • Do not use admin as the administrator's username; it is the first name the guessing programs try.

  • Always sign in over https, so the password travels encrypted.

  • Protect the accounts behind the site with the same care: your hosting account, cPanel and the mailbox that receives password reset messages. Whoever controls that mailbox can reset everything else.

4. Limit admin accounts

An administrator can install plugins, edit code and delete the site. Few people need that every day.

  • WordPress has roles with fewer rights: Editor, Author, Contributor and Subscriber. Give each person the lowest role that lets them do their work. Someone who only writes articles does not need to be an administrator.

  • Give every person their own account. A shared login hides who did what, and it cannot be taken away from one person only.

  • When a developer needs administrator access for a job, create an account for the job and remove it afterwards.

  • Read the Users list now and then, and remove accounts that are no longer needed or that you do not recognise.

5. Your own copy before big changes

Before a major update, a new theme or a new plugin on a site that takes orders, make your own copy of the site.

  • The files: above all the wp-content folder, which holds your themes, plugins and uploads, and the file wp-config.php. In cPanel, File Manager can compress a folder so that you can download it.

  • The database: this is where your pages, posts, orders and settings live. phpMyAdmin in cPanel can export it to a file.

Keep the copy on your own computer or storage, not only on the server it came from, and write on it when it was made. If a change goes wrong, you then have something to return to.

6. Small things that add up

  • Remove what was forgotten: old test installations, copies of the site in subfolders and unused files in public_html. Nobody updates them, and attackers look for exactly such leftovers.

  • Open Tools → Site Health from time to time and read what WordPress itself recommends.

  • Learn the warning signs: administrator accounts you did not create, files you do not recognise, visitors being sent to another website, or a warning from a browser or a search engine.

If you think your site was broken into

  1. Change the passwords of every administrator, of cPanel and of the mailbox used for password resets.

  2. Remove users, plugins and themes that you do not recognise.

  3. Update everything.

  4. If you have a clean copy of your own from before the problem, consider returning to it, and then update again.

  5. Open a ticket in Support, department Technical, category WordPress, and describe what you see. Never write a password in a ticket.

If you are still planning your site, WordPress hosting at MotherHosting comes with cPanel, free SSL certificates and email on your own domain, and our article Install WordPress covers the first steps. From the first day, the habits above are what keep it in good health.

To order, contact us

Tell us the plan or domain you want. We set up your order and send you the invoice.