Skip to content
No results
  • Home
  • Contact Me
    • Open Contact Form
    • Call Me
    • Send me an SMS (Text)
    • Email Me
    • Message me on Facebook
    • Message me on Whatsapp
  • News
  • Portfolio
    • Blender
    • Website Portfolio
    • Photogrammetry
  • Services
    • 3D Modelling
    • Website Design
    • NextCloud Installation and Administration
    • PC Repair & Service
    • Collection & Delivery
    • Home Callouts
    • Remote Desktop
  • Nextcloud
  • WordPress
    • My WordPress Plugins
    • Reviews
    • Theme Customizations
    • Tip and Tricks
  • Other Sites
    • Client Login
    • RoAdHoGg Plays
    • My NFT’s
    • My Shop
    • My Website Demo Server
Mark N Hewitt | FreeLance GeekMark N Hewitt | FreeLance Geek
  • Home
  • Contact Me
    • Open Contact Form
    • Call Me
    • Send me an SMS (Text)
    • Email Me
    • Message me on Facebook
    • Message me on Whatsapp
  • News
  • Portfolio
    • Blender
    • Website Portfolio
    • Photogrammetry
  • Services
    • 3D Modelling
    • Website Design
    • NextCloud Installation and Administration
    • PC Repair & Service
    • Collection & Delivery
    • Home Callouts
    • Remote Desktop
  • Nextcloud
  • WordPress
    • My WordPress Plugins
    • Reviews
    • Theme Customizations
    • Tip and Tricks
  • Other Sites
    • Client Login
    • RoAdHoGg Plays
    • My NFT’s
    • My Shop
    • My Website Demo Server
Mark N Hewitt | FreeLance GeekMark N Hewitt | FreeLance Geek
Home Wordpress Tip and Tricks Securing WordPress

Securing WordPress

I have used WordPress for many years and have experienced various problems with bots and undesirable users trying to spam my sites. I use various methods to stop them.

Disable XML-PRC

The first thing you should do is to disable XML-RPC

XML-RPC is a remote connection protocol for letting external application communicate with WordPress. The only problem is that is used to exploit WordPress

There are multiple ways to disable XML-RPC

Of course, my favourite way is to disable it manually by adding a small amount of code to your .htaccess file in the root directory of your WordPress installation. Code Below:

The Code

<FilesMatch "xmlrpc\.php">
  Order allow,deny
  Deny from all
</FilesMatch>

Via a Plugin

The other way is to add a plugin to disable XML-RPC and its called funnily enough – Disable XML-RPC available on the WordPress Repository.

Change the default Admin URL

By default, the WordPress Admin Url is https://your-website.co.uk/wp-admin/ By making this simple change, it stops most bots from trying to log into your website and making accounts for your website, most useful for community websites.

I haven’t found a simple method of achieving this with a piece of code so I will recommend a plugin for this part. WPS Hide login will hide your WordPress wp-admin for logged out users, once logged in you still access /wp-admin/ in the normal way.

As an extra step once the plugin has been enabled you can block the default wp-login.php with the following code.

<FilesMatch "wp-login\.php|xmlrpc\.php">
  Order allow,deny
  Deny from all
</FilesMatch>

Limiting login attempts

Limiting login attempts has two benefits, one it stops bots cycling through lots of passwords one after another thus reducing the load on your webserver and stopping your website from slowing down.

Again this is achieved with the use of a plugin I would recommend Limit Login Attempts Reloaded from the WordPress Repository. It limit’s the number of retries temporarily banning users for repeated incorrect logins, slowing the bots down.

Making use of Cloudflare

Using Cloudflare has many benefits including the security of your WordPress installation.

You can use it for free too. So its a bit of a no brainer really.

I may get around to doing some Cloudflare tutorial so watch this space 🙂

I have made a newer WordPress Security post that bolsters my sites even more, increasing performance.

You can read the post HERE

Tags
# .htaccess# admin# cloudflare# limit login attempts# security# wordpress# XML-PRM
Previous Post How to Force https on Wordpress
Next Post Why make a WordPress Plugin
wordpress plugin code image

Leave a ReplyCancel Reply

Your email address will not be published. Required fields are marked *


Advertisement

Currently Working on:

Buddha Resting on Knee

Buddha Resting on Knee

Buddha Resting on Knee by MarkNHewitt on Sketchfab Triangles: 1M Vertices: 500k This is a Ornament of a Buddha resting on her…

My NFT's

I made a new NFT Collection

The New NFT Collection is a Story Collection called The Code Its a collection of 6 Images along with six…

Tags

.htaccess 3d admin animated blender Blocksy clients cloudflare community Complete Design and Hosting Package custom code D W Removals Electric ESR family Free Secure SSL Certificate Google Pixel 8 Health Hosted Hosted and Maintained by me https:// In Development limit login attempts Live Model National nextcloud NHS Photogrammetry plugin Record security Self Hosting Service sharing shortcode skull Staff Stop WordPress Spam Theme tips and tricks Video Header website wordpress XML-PRM
  • About Me
  • Glossary
  • Privacy Policy
  • Cookie Policy (UK)

Copyright © 2025 Mark N Hewitt | FreeLance Geek - theme by Creative Themes

Social Chat is free, download and try it now here!