6 Useful WordPress Tips, Tricks & Hacks to Secure and Improve Your Website

In this article, I would like to share more information about adding Forbidden Words lists to your post titles and we will also talk about spam and a plugin that helps filter it, called Akismet.

Both things are sometimes necessary to do and many users are asking how it is possible, so let me share the needed details with you.

Besides these things, you can find other useful information about some plugins and you can also find out how to do a WordPress database backup manually.

Adding a list of Forbidden Words for WordPress titles

First of all, you need to keep in mind that the authors have publishing rights. You have the opportunity to edit these author privileges, so you can keep your website clean of the unwanted words, but by doing this, you could face some traffic and time consequences on your website.

So, here is the following easier way to restrict users of posting “ugly” words on your website’s post titles.

What you need to do is easy, as you simply have to add the code (which will be provided below) to your WordPress website theme’s functions.php file (or site-specific plugin):

function wpb_forbidden_title($title){

global $post;

$title = $post->post_title;

// Add restricted words or phrases separated by a semicolon

$restricted_words = "word1;word2;word3";

$restricted_words = explode(";", $restricted_words);

foreach($restricted_words as $restricted_word){

if (stristr( $title, $restricted_word))

wp_die( __('Error: You have used a forbidden word "'. $restricted_word .'" in post title') );

}}

add_action('publish_post', 'wpb_forbidden_title', 10, 1);

The restricted words you want to add is what you need to write to the $restricted_words area, and each word or phrase must have a semicolon after it.

The given code has the ability to check the published post’s title, when they are being published. If the title contains the word which is included in the code, it will send and error (Error: You have used a forbidden word “Bad Word” in post title) to the user and this will stop the publishing process of the post.

Remember that any time you update your WordPress files with a new code snippet, it is very important to always back your WordPress site up.

Simple as that, we have learned how to ban unwanted words from your WordPress titles.

Delete Spam Comments After Few Days

First and foremost, you should know that when you install WordPress, it has two basic plugins that are already built into your WordPress. The one that we will talk about, which is one of the most requested plugins for your everyday use is Akismet, a plugin that helps you filter spam comments or posts on your website. Spam and fake comments or posts can sometimes be annoying, as they can fill the comment section up, usually with nonsense and nobody really likes them. It is always good to keep your website’s comment sections and posts spam-free. Now, let`s talk about this easy-to-use and extensive plugin that will help you in spam monitoring and filtering.

So, Akismet is built into the WordPress installation process as we said, however, you need to activate it separately. It is recommended to do so, if you would like your site to be spam-free and so that your database backup size could decrease.

Akismet holds spam comments for 15 days before deleting them by default. Here, you will learn how to change that schedule, so that you can keep your website and database spam-free. Sometimes it is good to run through and check the spam comments, as you may find a few legitimate ones, but sometimes it is just necessary to let the plugin do the work instead of you.

If Akismet marks a genuine comment as spam, you can unmark it and this will lead Akismet to upgrade its algorithms and filter these spam comments better, according to your given criteria.

The following snippet code must be used in order to change the scheduled time for spam comments on Akismet. Add the code to your theme’s functions.php file (or site-specific plugin):

add_filter( 'akismet_delete_comment_interval', 'custom_spam_delete_interval' ); function custom_spam_delete_interval() { return 7; }

Edit the number 7 to modify the days, to the number you want, in order to change Akismet`s spam clearing time schedule. If you put the number to 0 then you will have less time to review the comments, but all comments will be deleted on the next scheduled time.

Remember to always backup your WordPress site if you have added a new snippet to your WordPress code.

By visiting the Setting -> Akismet page, you will see a note which says: “Spam in the spam folder older than 7 days is deleted automatically”. On the bottom of this page and you can see the changes you made so far. The number 7 will be replaced by the new given number that you have used in your filter.

This is all that you need to do to change Akismet’s delete rate schedule and it is a very simple task.

Backup WordPress Database using phpMyAdmin

It is a basic recommendation and also it must be prioritized to always have a backup system for your WordPress site. If anything would go wrong, this will let you restore your website after a malfunction. It is even possible that you get hacked or you come across a plugin error. If this happens, you can lose access to your WordPress admin area and it could be possible that you won`t be able to use plugins for backups. Causes like this are also when it is recommended to do a manual backup.

PhpMyAdmin, the open source software will let you manage your MySQL database and it uses an interface that is based on the web.

Log in to your WordPress account, and on the hosting panel, under the database section click on phpMyAdmin.

Click on your WordPress database name that you would like to be selected, and from the top menu bar find and click the Export option.

Selecting the custom method will let you choose from many different options, you can select and deselect tables, but do so only if you are sure about what you`re doing.

Scroll down further until you reach the output section, where you need to change the output of the export process. Select the “Save output to a file” option and select the zipped or gzipped format option to compress.

Scroll until you get to the bottom of the page and click Go. The database exported from PhpMyAdmin will be sent to you in a zip or gzip file, based on what you have chosen.

Create Visual Appealing Content with Zedity (WordPress WYSIWYG Editor)

The Zedity plugin often comes in handy for new users without much experience, as it is a hundred percent visual content creation tool. It is fast and simple to use; while it generates all your Javascript or HTML5 codes, you can focus on what matters more (ex.: placing a text on the top of an image without coding).

Zedity is a time saver, especially if you want to edit your content without coding, as this plugin will do it for you instead. The flexible possibilities of this plugin are not included in the WordPress visual editor, so install and activate it, because you don’t want to miss the chance of using Zedity – the more you use it, the more you will like it. Many tutorials are included and lots of support, which might be a bit basic for advanced users, but you should definitely consider giving it a try.

Use JetPack to Improve Security and Load Time

To put it simply, this plugin protects you from hackers, boosts the loading speed of pages improving user experience. The JetPack plugin is an open source project, which contains many helpful widgets to choose from, which can also improve the looks of your website. Using JetPack helps you to create a custom and unique site, with features like Configurable Widgets, Notifications and Subscriptions, Custom CSS, and many more. Your site is also protected from attacks and unauthorized logins.

The plugin always keeps you updated; JetPack can tell you how many visitors you have on your website. It also contains tools that you can use to increase traffic on your site. JetPack accelerates and speeds up images, using its global content delivery network (reduced hosting costs and bandwidth). We can safely say that it is a major plugin; consider trying and using it if you haven’t already, as you can see it can provide you with a wide variety of advantages.

Customize Content Like a Pro with TinyMCE Advanced

When you are writing an article and you are in need of more features, use this plugin tool. It offers many possibilities that can help you to make the best page content and layout possible. Having TinyMCE Advanced, you can arrange, add or remove buttons on the Visual Editor’s toolbar. These will provide you with features like creating and editing tables, more options when inserting lists, the ability to set font or family size, search and replace, and many more. Remember, the toolbar is fully customizable, according to your needs. You can insert date and time buttons with only a click, use custom fonts on themes and insert emoticons. It is an impressive HTML editor that you can try; you can also find something new and it might even improve your skills.

Wrapping it up

These are only few tips and tricks that can help you manage your content easier and better. Having a database backup on your computer is always beneficial, because you don’t know when you need to restore your site. Using the phpMyAdmin tool is easy to export and save your WordPress database and store it locally on your computer.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

What Are Your Thoughts?

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

To improve your online experience, BeHosted! use cookies. Disclosure: BeHosted! is monetized through refferal sales. Click here to learn more.