• Creator
  • #23049

    Been thanked: 0 times


    You can find an exemple of the problem here: http://www.speedrone.com/blog-shortcode-test/.
    The shortcode used is:

    Guide to Creating WordPress XML Sitemaps and Submission

    Xml Sitemaps Guide

    Adding XML sitemap to your site is an important step towards improving your site’s ability to get indexed by search engines. Adding XML sitemaps is an easy task that will only require you a few minutes and you can now monitor how your site will be performing in the search engines. Whenever, I want to know the number of my indexed pages on Google I always use the old trick; typing ‘site’ followed by a colon then the site URL. This allows me to quickly see the index status of my website. In the contrary adding a sitemap allows me to have a detailed report on how the site has been indexed. There are a two prerequisites to adding an XML sitemap to your website, the first is you need to have a Google Webmaster Tools account, Bing webmaster tools account and secondly you need a plugin or a means of generating an XML sitemap.

    What is an XML Sitemap?

    It helps to begin by understanding what an XML sitemap is and why we need to generate it and submit to search engines. A sitemap is a mapped out structure of your website that include all the links to various pages on your site. XML sitemaps guide search engine spiders as they index your website and they showcase your content and eliminate the content you don’t want indexed by search engines.

    In certain cases there may be duplicate content on your site that you don’t want indexed, a sitemap submitted to search engine can guide them not to index the 'noindex' pages. The simple sitemap can be a document that contains all the links in your site. The links can have additional information about each of the pages.

    Sign up on Google and Bing Webmaster Tools

    The first step is to sign up on Google Webmaster tools since you want to submit the sitemap to Google search engine after you have generated it. You should also sign up with Bing webmaster tools in order to submit the XML site map to Bing. To sign up with Google Webmaster Tools go to the Google Webmaster Console and simply use your Gmail account to sign in.

    xml sitemapsGenerating XML Sitemaps

    There are two ways you can generate XML sitemaps in WordPress, you can either choose to auto generate your site map with plugins or you can generate the sitemaps manually. The latter is suitable for small sites but when you are dealing with a large site it is impossible to continually update your sitemap manually. This will not only become tedious work but will waste a significant amount of time.

    Generating XML sitemap manually

    To generate an XML sitemap manually you should go to this site –XML Sitemaps

    XML sitemap generator

    Enter your site URL, change frequency, last modification and priority then generate the sitemap. As earlier said, this approach is only suitable for a site that has few pages. Fir a large site you require a means to auto generated the site maps and there are two most useful WordPress plugins for this task.

    Best XML Sitemap WordPress Plugins

    I would recommend two plugins as the best for generating XML sitemap. These are the best plugins; Yoast SEO plugin and Google XML sitemaps plugin. I prefer the former since it has other SEO features that I tend to use for WordPress on-page optimization. You should avoid installing and activating both plugins since they are likely to generate plugin conflict.

    I will use the Yoast SEO plugin for my demonstration on how to generate and submit an XML sitemap. For the purpose of this tutorial, I previously installed WordPress manually on web host. I will use this demo site to illustrate on how to generate a sitemap and submit it to search engines for indexing.

    Generating XML sitemap with a Plugin

    Generating an XML sitemap with a plugin is very easy since you just need to install the plugin and navigate to the settings; XML sitemaps then generate the sitemap, review it and submit it to search engines.

    Step 1: Install Yoast SEO plugin to Generate Sitemap

    Install and activate the Yoast SEO plugin just like any other plugin. When the plugin is active on your WordPress dashboard menu you will see the link to the settings of Yoast Plugin.

    xaml sitemaps

    Step 2: Generate the XML sitemap

    Under the Yoast SEO menu click on the XML sitemaps menu and enable the sitemap feature. Under the general tab you should now click on the button to view your sitemap which will be automatically generated by the plugin. You can edit the number of maximum entries you want to see in the sitemap, the user sitemap allows you to generate sitemap for authors.

    XML sitemaps

    Post types tab allows you to set how you whether you want different posts types to be indexed. I always leave out the media since I do not want it on my sitemap. Finally, you can exclude posts, categories and tags using the other tabs. After making your preferred sitemap changes, you should save the settings and now submit the sitemap to search engines.

    Step 3: Reviewing the Sitemap

    After you have set up the setting of your sitemap, it is time to now review and see how your sitemap looks. This is important since it allows you to either add or eliminate some of the URLs that you do not want submitted to the search engines. Click on the XML sitemap button under the general tab and you will be redirected to your sitemap in a new tab. It should look something like this:


    Submitting XML Sitemaps to Search Engines

    After generating XML sitemap, you should now login to your Google Webmaster tools account or Bing webmaster tools and submit your sitemap for indexing. To submit on Google Webmaster tools, you need to first add the property then test your sitemap before submitting it. You should click on the property that is verified on Google Webmaster tools, then click on add sitemap button to test and add a sitemap.

    google sitemaps


    We have successfully created an XML sitemap and submitted it to Google Search engines. You too can create a sitemap for your site and begin your journey to better search engine ranking. I hope this tutorial is helpful to you as you create your website’s sitemap. If you would like to share further comments, compliments or ask questions, feel free to leave a comment.

    How to Create WordPress Child Theme Step by Step

    child theme tutorial

    Before learning how to create a child theme, it is important for you to know what a child theme is and why it is important. A child theme is a separate theme that is dependent on a parent theme to function.  A child theme gets all the code from the parent theme. It is thus a child of the parent theme. Customizing a theme makes it hard for you to update it to the newest version without losing the changes you made.  If you are making any changes on your current theme you need a child theme. A child theme makes it possible for you to update your parent theme without losing your changes and lets you use all themes functionalities in the child.

    Creating a Child Theme

    Now that you know what a child theme is and when it is used, let’s learn how to create a child theme. To get started with , you need to have some HTML ,CSS skills and PHP basic skills. You also need to have the logins to the theme file from the hosting Cpanel or the FTP. If you have an option to download the theme, you can create a child theme on your localhost.

    In the web host environment,  you can use an FTP account from software such as Filezilla to make it easier for you to edit and add files to your server. For this tutorial we will be creating a child theme in the localhost demo site we created in the tutorial - installing WordPress on localhost.

    Step 1: Create a Child Theme’s Folder

    child theme folder

    Creating a child theme’s folder is the first step. Login to your website using your FTP client and go to “wp-content/themes/”. Inside the theme folder, you will see folders with the themes installed in your website. Create a folder and give it your preferred name. It is important to give the folder a descriptive name that will help you know that it is the folder for the child theme. I created Evolve theme child theme folder inside my WordPress localhost installation as shown in the image above .

    Step 2: Create Child Theme’s style.css File

    After creating the child theme’s folder, you now need to create the child theme’s style.css file. The style.css file is important since it work sas a supplement of a kind to your parent theme’s style.css file. To create the style.css file, open a text editor and type or paste the following:

    Note: The information above is specific for this tutorial and can be altered to match your theme name, url and description.  You need to change the “Template” variables so as to make your child theme valid. To elaborate with an example; if you have installed the “Twenty Sixteen” theme in your website and you want to create a child theme for this theme; you will replace parent theme details with “Twenty Sixteen”. Here is a screen shot of what you should have on your text editor and how to save it in your child theme folder as style.css.

    child theme

    Step 3: Call the parent theme’s CSS file

    It is important for you to call the parent theme’s CSS file without the child theme’s style.css file to prevent WordPress making your child theme’s style.css file the default style file. In the event that WordPress makes your child theme’s style.css file the default style file, the theme would not have any CSS styling. To prevent this from happening; you need to add the following line of code to your child theme style.css file.

    After adding the above line of code, save your style.css file to your child theme’s folder.

    import styles

    This line of code tells WordPress to import all of the CSS from your parent theme’s style file prior to implementing any CSS in the child theme’s style.css file thus the parent theme’s style file will take precedence over any other CSS. You can now start creating additional styles below the comment. Any customization added to this theme will remain intact even when Evolve theme is updated. After saving this file when you navigate to your themes in the dashboard you should see the child theme is present and ready for activation.

    child theme

    Step 4: Activate your Child Theme

    The fourth step is to activate the child theme. To activate the child theme; go to “Appearance > Themes” in your WordPress admin area and you will see all the themes in the website. You will note that the parent theme is activated.

    activate child theme

    Look for your child theme with the information you used when creating your child theme’s style.css file and click on the activate button and your child theme will be active and it will be shown as the active theme. When you have activated your child theme, it is now time to test it ans see if everything works well. Visit your site and see if your child theme is working well and add some customization to try it out.

    Step 5: Using the Child Theme

    Now that you have created your child, it is time to make use of your child theme by adding customization on your child theme.Before we can add any customization Evolve child theme is working well.

    Evolve Child Theme

    With the child theme ready, you can now make any changes on your theme without worrying about losing the changes. The changes you make on the parent theme, copy and paste it on your child theme’s directory and the changes you make will go live.

    Step 6: Customizing Child Theme

    We can now comfortable carry out changes on our child theme by adding the changes in the stylesheet. For illustration, I would like to change the color of the header to red. I carry out the mock customization using Firebug plugin as follows:

    child theme customization

    From this mock customization, we need to add the following line of code in our child theme style sheet to change the color of header to red.

    You can learn  how to get started with WordPress theme customization but this should get you the red header in your child theme. This change will remain intact when you update Evolve theme. This saves you a great deal of time and headache that you will have when updating any WordPress theme, whilst you do not want to lose the custom changes you have made to the site. The site should now look like this after updating child theme stylesheet :

    final child theme


    With these steps, we have successfully created a child theme for Evolve and demonstrated how to make any changes to the theme. We can now comfortably make a child theme for any theme and carry out theme customization on the child instead of editing the parent theme. I hope this tutorial has demonstrated what you need to know on how to create a child theme step by step and you have successfully created one. I would like to hear from you about your experience creating a child theme, feel free to leave a comment.

    Manipulating WordPress Database via Phpmyadmin

    phpmyadminWordPress is built using PHP and uses MySQL database. All the information published in your WordPress site either as posts, pages, media or custom posts, is store in the MySQL database that is located in your hosting server. This database is very important since it contains all the data on your site. When this database is damaged, corrupted or deleted, there is no other way to restore your site. WordPress uses wp-config.php file to communicate with the database and any mis-configuration leads to database connection error. It is therefore important to always backup your WordPress site database and you can easily backup your site with the best 10 free backup plugins. It is advisable to begin by backing up your database before you can start learning how to manipulate it using Phpmyadmin. You can also install a dummy site on your localhost and use it to learn how to manipulate your WordPress database using Phpmyadmin. For a quick installation on localhost, see my previous tutorials – Installing WordPress on localhost Xampp or Wamp

    Accessing WordPress Database via Phpmyadmin

    Ensure you have backed up your WordPress database or you have installed WordPress on your localhost for you to learn how to manipulate database using Phpmyadmin. Phpmyadmin is free software that is very useful for accessing WordPress databases and making changes. For live sites, Phpmyadmin can be accessed through your hosting Control Panel. On your hosting control panel find the icon for Phpmyadmin.


    When you click on this button you will be redirected to Phpmyadmin, some hosting environment may have a direct access to Phpmyadmin while others will require you to login. You can use the Cpanel username and password to login into Phpmyadmin panel.

    phpmyadmin login

    If Phpmyadmin is not present in your hosting, you can download and install it on your server to begin using it. To download Phpmyadmin and install on your server, read the documentation on the official site – Phpmyadmin

    Getting Started with Phpmyadmin

    To access Phpmyadmin on your localhost use the following URL:

    When you have logged into Phpmyadmin panel it should be something like this:


    On the left side of the panel you should see a list of databases that you have created. On the top there is a menu that includes databases, SQL, Status, Users, Export, Import, Settings and others. You will use this Phpmyadmin panel to make edits on your database and save those changes.

    Locating WordPress Database

    To begin making these changes, you need to first identify the database and open it. If you have many databases, it may be difficult to identify by name unless you created it. If you installed WordPress manually on your web host, you should easily identify the database name.

    If you installed WordPress using Quick Installer like Fantastico, the database names are usually auto generated. The easiest way to locate the database is to check the name in wp-config.php file. Open this file and locate the following line of code:


    Now check the database on the left side column on Phpmyadmin panel. When you identify the database click to open it:


    For this tutorial our database is named ‘demo’ that we initially created when we installed WordPress on localhost - Xampp

    How to Backup WordPress Database on Phpmyadmin

    The first step when editing your WordPress database via Phpmyadmin is to learn how to back up your WordPress database. You can easily backup your database before editing using the export option in the Phpmyadmin panel

    Exporting WordPress Database from Phpmyadmin

    After identifying your database click on the export option on the menu and create a backup copy of your database. Choose the quick option as the export method and select SQL option as the file format. Once you have clicked on the go button save the database as your backup. When you choose to save the file ensure you save it in the format .sql.


    Restoring WordPress Database Backup via Phpmyadmin

    When you edit your database and something goes wrong, you can restore the database by using the import option and uploading the backup database. You can do either complete or partial database restoration, the format for the database should always remain SQL for easy restoration.


    How to Change and Password via Phpmyadmin

    When changing the password through Phpmyadmin you should ensure you don’t mess with other entries. You can change the password of your site through Phpmyadmin. To change the password or the username click on the wp_users table on your database and select the edit option as shown in the image below.


    When you click on the edit option you will see the database fields that you can edit or insert new entries. To edit the password look at user_pass and make the changes as follows:

    Change the function field to MD5

    Insert the new password example –thenewpassword

    Click on the GO button to save the changes

    password change

    When you have successfully changed the password you should see the result displayed as shown below. You should try out the new password on your site to see if you changed if successfully.

    new password

    You can also change the username field to reset your username to a new username.

    Editing Posts and Pages via Phpmyadmin

    You can also edit the post and pages via Phpmyadmin panel, click on wp_posts and you can edit the post content and the title of the pages and posts.

    edit posts


    As you have seen in this tutorial, you can edit several entries in your WordPress database entries. Phpmyadmin is a great platform that allows you to manage entries in your WordPress database. You can also use it as an alternative option of changing your username, the password or the admin email. This panel provides you with a great way to manipulate your WordPress database but you should always exercise caution to avoid losing your valuable data when making the changes. I hope this article enlightens you on how to start tweaking your WordPress site by making these changes through Phpmyadmin. If you have further questions, comments or compliments free feel to leave a comment.

    Top 10 Best Security Plugins to Stop Hackers

    Top 10 Best WordPress security plugins to Stop HackersThere has been an increase in the use of WordPress in the recent past making WordPress the most popular blogging and website building platform in the world. Due to its popularity and increase in number of people using WordPress to create their websites, these websites are becoming a target to hackers. WordPress is build on rock-solid secure framework but this does not mean that it is completely safe. I previously shared tips on how to secure WordPress it using .htaccess - Ultimate Guide to WordPress .htaccess.

    WordPress has some vulnerability which hackers are exploiting . To solve this problem, WordPress usually have updates to cover some of the vulnerabilities; however, hackers still look for more vulnerabilities, it is important for you to have an additional layer of security for your WordPress website. Due to the quest for secure websites, different WordPress security plugins have been created to help WordPress website owners make their sites more secure.  Here is the list of top 10 best WordPress security plugins you can use to secure your WordPress site today.

    1) WordFence Security

     Top 10 Best security plugins to Stop Hackers

    The Wordfence security plugin is an open source and free plugin that assists you in securing your WordPress website. This plugin starts off by checking if your site is already infected by doing an in-depth server-side scan of the source code matching it to the Official WordPress source for main themes and plugins. The plugin has a Premium API key that offers Password Auditing, Premium Support, Scheduled Scans and Country Blocking.

    Download Wordfence Security Plugin

     2) Sucuri Security

     Top 10 Best security plugins to Stop Hackers Sucuri Security is a free auditing, malware scanner and security hardening plugin. This plugin is mainly a monitoring tool that helps WordPress website owners analyze and monitor events within their websites such as the people logging in to the website and the kind of changes being made on the website. The Sucuri Security plugin also offers other advance features such as remote malware scanning, blacklist monitoring, file integrity monitoring and post-hack security actions.

    Download Sucuri Security Plugin

    3) Bulletproof security

     Top 10 Best security plugins to Stop Hackers The BulletProof Security plugin is another great WordPress security plugin that has a one-click setup wizard making it fast and easy to set up. The plugin features; BPS plugin uninstallation, .htaccess, Website Security Protection (Firewalls), Login Security & Monitoring, Idle Session Logout (ISL), Auth Cookie Expiration (ACE), DB Backup Logging, DB Table Prefix Changer, Security Logging and HTTP Error Logging. This plugin also offers UI Theme Skin Changer with 3 theme skins, jQuery UI Dialog Form Uninstall Options: BPS Pro upgrade uninstallation or complete and DB Backup: Full|Partial DB Backups | Manual|Scheduled DB Backups | Email Zip.

    Download BulletProof Security Plugin

    4) VaultPress

    Top 10 Best security plugins to Stop Hackers

    The VaultPress is an automated security scanning and real-time backup subscription service by Automattic. This WordPress security plugin makes it easy for WordPress website owners to back up their site content on a daily basis or in real-time. This plugin also provides automated security scan for threats in your website.

    Download VaultPress Plugin

    5) iTthemes Security (formerly Better WP Security)

     Top 10 Best security plugins to Stop Hackers iThemes Security plugin by iThemes provides you with over 30 ways to secure your WordPress website. The plugin provides the user with a list of security actions they wish to take. The plugin is designed to conceal common WordPress security vulnerabilities and loopholes so as to avoid hackers from being in the know about your site and stop programmed attacks and reinforce user identifications. It features a one-click activation for most features which is ideal for beginners, as well as advanced features for skilled users. The plugin screens your site and reports changes to the filesystem and database that might show signs of a security concern. iThemes Security also hides helps to identify bots and other attempts to search susceptibilities in your website. The plugin makes consistent backups of your WordPress database which makes it easier and quicker for you to get back in the event of an attack.

    Download iTheme Security Plugin

    6) Clef Two-Factor Authentication

     Top 10 Best security plugins to Stop Hackers The Clef Two-factor authentication plugin is a security service that is designed to help WordPress users securely login to their websites. The plugin offers free and pro versions and has a mobile app for IOS and Android. The Clef mobile app offers password-free and two-factor verification that is extremely secure and easy to use. You only need to synchronize your phone with the Clef Wave to log in. Some of the best features of this plugin are; single sign on/off, no extra device and no passwords.

    With the Clef wave, you can use two-factor protection without the need for one-time codes. You do not need a security key or a USB drive; you can just use your smartphone. The plugin offers one-click sign in/off from all your sites by synchronizing with the Clef Wave or by setting a timer sign you or log you out automatically. Other great things about this plugin is that it substitutes passwords with extremely safe, two-factor logins with the help of the tried-and-true RSA public-key cryptosystem and disables passwords for the three WordPress verification points: Dashboard access, API access, and password reset protecting your website against the complete scale of password-based attack routes.

    Download Clef Two-Factor Authentication Plugin

     7) Shield (formerly Simple Firewall)

     Top 10 Best security plugins to Stop Hackers Shield (formerly Simple Firewall) is a great security system for WordPress websites that has an easy to setup interface and has no restrictions on security features. If features plugin self-security protection and exclusive membership to private security group. The plugin blocks malicious URLs and requests, stops brute force attacks on your login and any endeavored programmed bot logins. It also blocks all programmed spambot comments, observes login activity and review admin activity with a comprehensive Audit Trail Log and conceals your WordPress Admin and Login page.

    Download Shield (formerly Simple Firewall) Plugin

    8) Ninja Firewall

     Top 10 Best security plugins to Stop Hackers NinjaFirewall is a web application firewall that can be configures like a plugin. It offers users powerful security features that are not found in WordPress. It screens, disinfect or reject any HTTP/HTTPS request sent to a PHP script prior to it getting g to WordPress or any of its plugins. It includes the most prevailing filtering engine available in any WordPress plugin. One of the most significant features in NinjaFirewall is its capability to standardize and change data from inbound HTTP requests which permits it to detect Web Application Firewall elusion procedures and mystification strategies used by hackers, as well as to maintain and decrypt an enormous set of encodings.

    Download NinjaFirewall Plugin

     9) All In One WP Security & Firewall

    security plugins The All In One WP Security & Firewall plugin has a user friendly interface. It offers security by examination for susceptibilities and by executing and administering the latest endorsed WordPress security practices and procedures. Some of the features present in this plugin include; user accounts security, user login security, user registration security, database security, file system security, htaccess and wp-config.php file backup and restore, blacklist functionality and firewall functionality among others.

    Download All In One WP Security & Firewall Plugin

    10) Loginizer

    security plugins to Stop HackersThis WordPress security plugin helps you fight against bruteforce invasions by blocking login for the IP when it gets to maximum retries permitted. The plugin enables you to blacklist or whitelist IPs for login. The plugin features; blacklist IP/IP range, whitelist IP/IP range, check logs of failed attempts, delete IP ranges, Create IP ranges and licensed under GNU GPL version 3. The plugin also prolongs lockout when maximum lockouts allowed is reached and emails notification to admin after maximum lockouts.

    Download Loginizer Plugin

    WordPress susceptibility can result from weak passwords, plugin vulnerability among other such susceptibilities. It is your responsibility as a WordPress website owner to increase the security of your website. Years ago, securing your WordPress website was a tiresome task but it has been simplified by plugins. The above plugin are some of the best WordPress security plugins that can help you secure your website and keep hackers off. Being hacked is one of the most unfortunate things that can happen. To keep your mind at ease, you need to keep reviewing your website security systems and methods so as to ensure that your website is not susceptible to hackers.

    Get Started with WordPress Plugins – Build Your First Plugin

    Build first WordPress Plugin

    WordPress plugins are small bits of codes that are used to extend the functionality of WordPress. Plugins can be very useful in creating new features in WordPress or extending existing features to make them easier to use. I would like to illustrate in this tutorial how plugins work and by building a plugin from scratch. Recently, I outlined how to build and membership site in a tutorial – Building a Membership site in WordPress. In this tutorial I highlighted the different features of a good membership site. I would like to revisit one of these features and build a plugin based on this feature. I will be building a WordPress login form plugin that enables members of your site to login from a page. I want this plugin to achieve the following goals:

    Make it easy for administrator to create login page using a shortcode

    Allow login forms to be added to any WordPress page easily

    Successfully create the login form system for members

    For you to understand how WordPress login functions work, I would recommend you read my previous detailed tutorial on creating a custom WordPress login page – Creating Custom WordPress login page with Brand Identity. Let us now get started with building our first WordPress plugin.

    Register WordPress Plugin

    The first step when building a WordPress plugin is to register the plugin‘s name, plugin URL, plugin description, plugin version, author name and the author URL. This is the most important step since this file tells WordPress that this is a plugin when it is uploaded in the folder wp-content/plugins.

    You can substitute these values with your own, for this tutorial I have named the plugin ‘ Tuts Login Form’ You should be careful when naming plugins since if you use existing names there is a possibly you can end up with plugin conflicts, see my detailed tutorial – Causes and Solutions of Plugins Conflicts

    Create a Plugin Folder

    The second step is to create a folder with the plugin’s name and save the main plugin file inside that folder and name it tuts-login-form.php. You should also create another folder inside this plugin folder and name it CSS and another folder named includes. See the image below:

    Get Started with WordPress Plugins – Build Your First Plugin

    Register Includes Folder in the Main File

    Now we need to create the definitive path for our plugins include file where we will place all additional files that we need to be called to our main file. We create a Php function defining includes’ folder path as follows:

    Enqueue Stylesheet and JavaScript Files

    Here we now need to enqueue our CSS and JavaScript; this is the process of how stylesheet and JavaScript are added in WordPress. You can learn more on how to enqueue scripts in WordPress from – wp_enqueue_script()

    Create Shortcode Function to Add Login to Pages and Posts

    Now let’s create the shortcode that we will be using for publishing the login form in our pages. The following is the code that will add shortcode to our plugin. We have defined the name of the shortcode as [tuts-login-form] this is the shortcode we will use later in our pages to create the login form.

    Create Function for the Login Shortcode and Login Form

    We need to create a function to test our login shortcode and also use an If statement to test various conditions the most important – if the user is logged in. Here is a simplified breakdown:

    Redirecting Logged Users to Homepage

    This function tests if the user is logged in, if true the user is redirected to the home page.

              Creating the Login Form

    This section creates the login form that we will be styling later to make it more appealing to the users.

    Complete Code for Testing Shortcode and Creating Login Form

    The complete code that includes the shortcode function, the login form and the login status test should be as follows:

    Failed Login Redirect to Homepage

    We need to have a way of redirecting those failed logins to the front end. This can be achieved by creating a hook for failed login. This code should look something like:

    Complete Code for Main Plugin File

    Here is the full code that should be saved in a main filed and named as tuts-login-form.php

         Styling the Login Form

    After building this login form and its shortcode; now it is time to style it so that it looks good. We will be styling the HTML elements that were added to the section above to create the form. Here is the full code for styling this login form.

    Remember to save this stylesheet as front-style.css and place it in includes folder we create earlier on in this tutorial.

    Testing 'Tuts Login Form Plugin'

    After completing building this plugin, it is now time to see how it works and possibly debug if there are any errors. Add the plugin to your plugins directory wp-content/plugins or install the plugins just like any other plugin and activate it.

    Get Started with WordPress Plugins – Build Your First Plugin

    Create Login Page with Shortcode

    Now we need to go to the Add page in WordPress and create a page that has our shortcode in the text area. The shortcode we created is [tuts-login-form], add this shortcode and create the login page.

    Get Started with WordPress Plugins – Build Your First Plugin

    Test Frontend Login Form

    After creating this login page, you should now visit the page and ensure you are logged out before visiting this page. If you followed every step correctly, you should see the login as shown below:

    Get Started with WordPress Plugins – Build Your First Plugin

    Test the login form by logging in with your username and password. You should login successfully. This plugin now allows us to create the login form in any WordPress page or post a feature that is great for a membership site. It is important you note that I am running the demo site using the Evolve theme which is one of our FREE themes you can download and use.


    This tutorial has illustrated how you can use a plugin to achieve an objective like creating login form using a shortcode in WordPress pages. This is the role that all plugins play, which is simply extension of WordPress functionality to make it more robust and useful as a content management system. I hope you have followed this tutorial and successfully create the Tuts Login Form Plugin or your own version. If you have additional comments, compliments or want to seek some clarification, please leave me a comment.

    20 Useful Woocommerce Snippets for WordPress Themes

    20 Useful Woocommerce Snippets for WordPress ThemesWoocommerce is increasingly becoming the eCommerce platform of choice for most new websites since it is not only easy to use but there are numerous freely available wooCommerce themes. In order to improve your wooCommerce development there are several code snippets that make it easier for developers building or customizing wooCommerce themes. If you are new to WordPress theme customization the tutorial - How to get Started Customizing WordPress Themes is a good place to start.

    From my experience, there are many snippets you can use to customize wooCommerce but the code snippets below have proven to be very useful and time saving for my projects. I would like to share with you these snippets as the best WooCommerce snippets.

    Best WooCommerce Snippets

    The following code snippets should help you customize the WooCommerce functionality and form. These code snippets should help you to remove or add functionality to WooCommerce.

    1) Declare WooCommerce support in third party theme

    The first most useful code is used for declaring WooCommerce support in your theme. This is a very important snippet that you can use to add WooCommerce support to any WordPress theme.

    2) Adding Custom Currency to WooCommerce

    WooCommerce by default To add a custom currency in WooCommerce 2.0+, copy and paste this code in your theme functions.php file and swap out the currency code and symbol with your own. After saving changes, it should be available from your WooCommerce settings.

    3) To display the cart contents and total in your template

    If you want to show the cart content and the total in your template you should use something like this:

    4) Change number of thumbnails per row in product galleries

    I always want to change the thumbnail displayed per row in product galleries, I often use this code to change the display per row.

    5) Add a new country to countries list

    To add a new country to the countries list, use this snippet (you can paste it in the functions.php file within our theme folder):

    6) Display My Account link in a template file

    Displays a link to the user account section. If the user is not logged in the link will display ‘Login / Register’ and take the use to the login / signup page. If the user is logged in the link will display ‘My account’ and take them directly to their account.

    7) Display a checkout link in a template file

    This snippet displays a link to your checkout when there are products in the cart. If you want to display the checkout link regardless, remove the if statement

    8) Change number of products displayed per page

    If you want to display 25 product per page you should add this code to your functions.php. You can also alter that number to your preference.

    9) Set Image Dimension

    Add the following snippet to your themes functions.php file to adjust the quantity inputs behavior.

    Set the starting value, maximum value, minimum value and increment amount

    10) Automatically Complete Orders

    Sometimes I like it when the cart automatically completes the orders. To achieve this auto completion I use the following block of code

    11) Change email subject lines

    Default Woocommerce email subject line are not the best, you can customize theme using the following code:

    12 ) Adjust the quantity input values

    Add the following snippet to your themes functions.php file to adjust the quantity inputs behavior. Set the starting value, maximum value, minimum value and increment amount.

    13) Allow shortcodes in product excerpts

    Shorcodes in WordPress make it very easy for you to publish content without editing theme core files. To allow shortcodes in product excerpts, I use the following code.

    14) Change add to cart button text

    Customizing cart button allows you to display text in your preferred text. You can add the following to your functions.php file to change add to cart button text.

    15) Products loop

    This is the most important snippet I use regularly to display the products. The product loop is very useful when you are creating page template to show case products. Here is the products loop.

    16) Remove the breadcrumbs

    Occasionally, you want to remove the breadcrumbs, here is the quick snippet to help you remove woocommerce breadcrumbs from your pages.

    17) Replace shop page title

    Using this block of code you can quickly, replace the title of your shop. Just substitute the return value with your preferred name.

    18) Order by price, date or title on shop page

    Ordering product by price, date and title is a good way to help customers sort out the products in your site. The following snippet helps you to order the products by price, date or the title.

    19) Redirect to checkout page after add to cart

    To improve the sales conversions , automatically redirecting to checkout page after adding product to cart is a cool move. To auto redirect customers to checkout when they add products to cart, use the following code:

    20) Remove product categories from shop page

    If you want to get rid of a certain product category from your shop page, this code is very useful. Maybe you don't want to display a certain category of product on shop since they are not the best sellers, use this snippet.


    I have shared the most useful snippets I use in my day to day wooCommerce development, I hope this list helps you to quickly edit wooCommerce themes and woocommerce websites.

    If you are new to wooCommerce development, these  snippets should help you get started with wooCommerce development as well as make a good reference for you in the future.I would like to get feedback from you. If you have additional comments, compliments or want to share your wooCommerce snippets with us, please feel free to leave us a comment.


    How to Detect Malicious Code or Malware on WordPress Themes

    malware-wordpress-mainWhen installing themes, it is important to know that certain free WordPress themes come ridden with malware, broken code or malicious links to third party sites. This is especially so, if the free WordPress theme is obtained outside the official WordPress repository. It becomes even scarier since most of these infected themes are offered in disguise of a special offer to the potential victims. While most of these infected WordPress themes may not contain harmful code but a backlink to a third-party site, some can contain encrypted code hidden inside theme files. Let’s look at how to detect malware and fix infected WordPress theme.

    Detect Malware and Malicious in WordPress Themes

    The first step in discovering hidden malware or malicious code in your WordPress theme is to check if the files contained in the theme are all required in WordPress theme. WordPress theme has some basic files required and may have additional files that are in folder called include, images and JS if any file has not been called in the functions.php file, it should be your first suspect. There are also a number of issues that can lead you to suspecting your theme or website has been infected with a malware:

    White screen of death: When your site shows sudden white screen of death, you should suspect there is a possibility of malware infection or malicious code in your website.

    Malware Warning: Warning from the malware site and it should be displayed on your site either blocking your site entirely or partially.

    WordPress .htaccess hijack: Your .htaccess has been high jacked and the site keeps redirecting to sites that you don’t understands, at times the redirect is to Google search.

    Popup ads and redirects: Several popup ads all over the site that keep redirecting to more popups when you click on close button.

    If you have experienced these issues there is a high likelihood that your website has been infected and possibly your theme. I would like to narrow down to WordPress themes malware infection and injection of malicious code and how to get rid of it.

    Reasons why WordPress theme is infected by Malware

    When you are downloading and installing WordPress themes you should be very cautious not to download and install a WordPress theme from unknown sources, pirate websites or nulled themes websites. The danger of downloading and installing themes from these sites far outweigh the benefits of using such a theme.

    I would recommend you to always install themes from WordPress repository like evolve whose authors are reputable. We also offer high quality themes that you can download from here

    Most infected themes that have malicious code or malware are always obtained outside WordPress repository or outside a reputable marketplace like Themeforest. These themes are infected since they are manipulated by hackers with the intention of stealing your data.

    I cannot overemphasize the need to install only those WordPress themes whose authors you can trust. Most of theme hackers want to create a secret backlink to their site, get access to your blog, redirect your site to spam blogs, add advertisements banners to your site and worse bring your site down!

    How to Detect Malicious Code in WordPress Themes

    Scanning WordPress Themes before Installation

    The first step when scanning for malware in WordPress themes is to scan the zip file before you can even install it in your WordPress site. When I download a WordPress theme and want to scan it for malware before install, I go to Virus Total which is very useful scanning tool. I upload and analyze the zip for any malware or malicious code:

    How to Detect Malicious Code or Malware on WordPress ThemesI to use this site to scan for malware and malicious in WordPress theme since you can see a detailed report of a particular zip and see previous scan that have been carried on this file. This helps you to make an informed decision before you install WordPress theme.

    How to Detect Malicious Code or Malware on WordPress Themes

    Scanning Installed WordPress Themes

    The fastest and easiest way to detect malware and malicious code in already installed WordPress themes is to use a plugin called TAC, theme authenticity checker. This plugin is priceless since it is able to scan your site and point out the location of malicious code making it easier for you to remove this code.

    The first step to detecting malware and malicious code in your WordPress theme is to download and install this plugin Theme Authenticity Checker (TAC)

    How to Detect Malicious Code or Malware on WordPress Themes

    How to Scan a WordPress Theme for Malicious Code with TAC

    After downloading and installing this plugin you should go to Dashboard > Appearance > TAC and will see list of WordPress themes with the warnings highlighted in red for those that contain malicious code if your theme is ok you see the message against the theme:

    How to Detect Malicious Code or Malware on WordPress ThemesAs you can see on the image above, on my localhost WordPress installation, I have three themes installed and the active theme is Evolve. You can see after the scan TAC has passed the themes since they don’t contain any malicious code or malware.

    Testing for Malicious Code in WordPress Themes

    I would illustrate by installing some malicious code in one of the installed WordPress themes and we see what happens when TAC scans again. I have added malicious encrypted code in the footer of Twentysixteen theme as shown below:

    How to Detect Malicious Code or Malware on WordPress Themes

    After adding this malicious code in this theme, I go back to TAC to check if it has been detected and look at the details for this malicious code:

    How to Detect Malicious Code or Malware on WordPress Themes

    As you can see from the scan, already we can see that this Twentysixteen theme has some encrypted code. This makes TAC a very effective plugin for detecting malicious code in WordPress themes.

    For you to determine where the malicious code is located you need to click on the details button and look at the file and line of code that has this malicious code:

    How to Detect Malicious Code or Malware on WordPress Themes

    Since we have located the file and the line of code where the encrypted code is located, we can navigate to that file and clean up the file. After cleaning up the code, you can now test to see if the theme is clean:

    How to Detect Malicious Code or Malware on WordPress Themes

    After cleaning this theme we can now see that it is devoid of any malicious code or links.


    Just as we have seen in this tutorial, WordPress themes can have injected malicious code that can harm or steal your information. It helps to stop and think about the source before you install that WordPress theme.

    If you would like to have surefire way keeping malware and malicious code in WordPress themes, the first step is installing themes you can trust. You can install our free WordPress themes since they have been tried and tested by thousands of clients.

    Secondly, you need to scan WordPress themes that you suspect might be infected with malware or malicious code. I hope this article is an eye-opener to you, please take time to share your experience, ask any question regarding this topic or leave a compliment in the comments section below.

    How to Add Fixed Image Background in WordPress

    How to Add Fixed Image Background in WordPress

    Adding images on your website improves the user experience and makes users related your content to the images. Images are a great part of web content that can be used to make visitors come back to your website. There are many places you can add images and graphics on your website the most common being the content. Images added on content should help share the ideas your content portrays to the reader. You can also add a background video if you want your site to be more interactive. In my previous tutorial, I highlighted the easiest way to add video background in WordPress, see the tutorial – how to add video background in WordPress.

    Choosing a Good Website Background Image

    Background images on the other hand are supposed to improve your site design and the visual appeal. The background image of your website should portray what you want your readers to think about your business or website. When adding you website background image you should go for that image that is strikingly fit for the theme of your business. To cite an example; a corporate website should have a background image that portrays the business world. In this article, I will show you how to add a fixed background image to your WordPress theme and how to enhance the appearance.

    Source of Your Background Image

    There are many places you can get free copyrights images that are free to use even for commercial projects. I recently outlined the best places to get images online in the post – 20 Best Places to Get Free Images for your Blog. My favorite website to get free images is Unsplash; I like their images since they are not only trendy but high resolution and all images are absolutely free! Isn’t that amazing? Alternatively, you can use your own image as the fixed background especially if you want to portray your business, office or any other place. After you obtain your image it is now time to add it to your WordPress site or theme. I have obtained the following image that I will be adding on my demo site.How to Add Fixed Image Background in WordPress

    Adding Background Image to WordPress

    As mentioned above I am adding the background image on my demo site that I created earlier by installing WordPress on localhost.

    How to Add Fixed Image Background in WordPress

    There are three common ways to add a background image to WordPress site.

    Adding via theme admin page

     Adding via WordPress Customizer

     Adding directly on theme stylesheet

    Adding via Theme Admin Page

    Most WordPress themes allow users to add background images using the theme administration page. This is not a default feature and it may vary from one theme to another but most of the WordPress themes coded well like Evolve will have an option of adding background image through the theme admin panel. For Evolve theme, you should go to Theme Options Page > Content > Content Image to upload the content background image for you theme.

    How to Add Fixed Image Background in WordPress

    When you add background image through the theme options page, the position of the background image, can be controlled using the custom CSS. Other themes have feature to control background image styles like the position, opacity and many more options.

    Adding via WordPress Customizer

    The second easiest way to add background image to your WordPress site it using the default WordPress customizer, it can be accessed by the customize link under the appearance. Login to your WordPress dashboard, go to Appearance > Customize. You will see the preview of the site and the left side the options panel that you can use to add background image. This may also be a feature absent in some themes but it is largely present in most of themes.

    How to Add Fixed Image Background in WordPress

    You should upload the image you prefer to be the background and save the settings. The advantage of using the customizer is the fact that you can see the preview of how you background image looks on your site.

    Adding Directly on Theme Stylesheet

    I like using this method to add background images to WordPress theme since I am in control of thing. This method uses the simple background CSS rule. You add the image URL and the styles you want applied to your background. This allows us you quickly have the background image attachment to be fixed and also we can control the position, opacity and other features of the background image.

    1)   Upload the Image to Media Files

    How to Add Fixed Image Background in WordPress

    The first step is to upload the image to the media files and grab that URL for the image source since we will be adding it to theme stylesheet.

    2)  Add Image to Theme Stylesheet

    To add the background image to theme stylesheet you need to add the following code to your body tag in the custom CSS or directly to the theme stylesheet. If you would like to know how to edit your theme stylesheet, see the step by step guide outlined in my previous tutorial – Getting Started with WordPress theme Customization

    Remember to replace the URL with the respective path of where you uploaded your background image.

    How to Add Fixed Image Background in WordPress

    3) Fixing and Positioning Background Image

    You can position the image by defining it in CSS as top, right, bottom as well as using percentages like 20% 20%. To fix the background image you need to apply the following CSS rule to the body:

    How to Add Fixed Image Background in WordPress

    The complete code for setting the background image as fixed for this tutorial is:

    How to Add Fixed Image Background in WordPress

    You can also define whether you want the opacity of the page to be different to give the background image more visibility. Example in the sample page, I would like to have the background image slightly visible through the content.

    How to Add Fixed Image Background in WordPress

    To achieve this you need to set your container or wrapper opacity to 0.85. Try this in you theme and keep trying different values until you are satisfied.


    We have successfully added a fixed background image to WordPress site. The most important take from this tutorial is the fact that background attachment is the CSS property that controls whether the background image will be fixed or not. I hope this article helps you add a fixed background to your site, if you have any questions, clarifications or additional remarks please leave a comment.

    How to Install WordPress Manually on Web Host

    How to Install WordPress Manually on WebhostInstalling WordPress on a web host is an easy task especially when you use installers that are freely available on your web host. The process is closely related to the installing WordPress on localhost since the steps are identical other than the location of the host. Lately, I don’t like installing WordPress using automatic installers since most have been bloated with promotions for premium themes and plugins something that I don’t like. When you use these automatic WordPress installers you end up installing plugins that you don’t want in your site. My all-time favorite automatic WordPress installer is Fantastico Deluxe which is rather a straightforward and easy to use quick WordPress installer.

    How to Install WordPress Manually on Webhost

    Since it was retired from my current web host – Hostgator, I have been installing WordPress manually since the alternatives are not the best. I am going to show you how to install WordPress on any web host manually.

    This can be a good way to install WordPress since you have control of every process. You create a database with your preferred name; you crate your preferred usernames and passwords. Some automatic web host WordPress installers will create the database and passwords automatically.

    Installing WordPress Manually on Web host

    You can use two methods to install WordPress manually on the web host, you can either:

    Install WordPress Manually via Cpanel

    Install WordPress Manually via FTP

    Let us look in details at each of these options. First we will start with installing WordPress manually on web host via the Cpanel.

    Install WordPress Manually via Cpanel

    How to Install WordPress Manually on Webhost

    You can install WordPress manually on your web host by following the following five steps. Please ensure you take care not to overrun an existing WordPress installation on your domain. For this tutorial, I will be installing WordPress on a subdirectory in my parent domain.

         1) Download and upload WordPress

    The first step is to download a copy of the latest version of WordPress and upload it to your Web host. You first need to login to your web host through the control panel and create a directory on where you want to install WordPress. For the case of this tutorial, the directory of WordPress installation is

    How to Install WordPress Manually on Webhost

    If you are installing in a domain, identity the domain site folder. If you added the domain and the DNS is set the respective site folder should be located in a path like this one: public_html/yoursite.com. Open this folder and upload the WordPress zip file there. To upload WordPress click on the upload icon and select the zip file from your desktop. When WordPress upload is complete you should extract all the files in this folder and delete the zip file. After downloading and uploading WordPress successfully to your site folder it is now time to create your site database.

       2) Create Database and user

    Creating a database on your web host may vary from one host to another but the most basic way of creating a database is through MySQL wizard. Click on MySQL database wizard button in your web host control panel and follow the steps to create a database and create the user.

    How to Install WordPress Manually on Webhost

    When you create the database user remember to assign the database user global privileges.

    How to Install WordPress Manually on Webhost

    Allocate the newly create database user all the global privileges. Assigning user privileges for specific database can also be undertaken using Phpmyadmin. There may also be possibility to create the database under the Phpmyadmin panel on your web host. For my web host we must use MySQL wizard to create the database but manipulation of the database is done using Phpmyadmin. I outlined the process of creating MySQL database using Phpmyadmin in my previous tutorial – installing WordPress on localhost Xampp & Wamp. The process is basically the same with creating a database via web host Phpmyadmin panel.

    How to Install WordPress Manually on Webhost

    After you have created the database and added a user who has global privileges it is time to now start setting up your WordPress installation.

    3) Configure WordPress Setup

    After creating a database we are now ready to begin setting up WordPress. Now visit your site. In my case I will go to my browser and type:

    When you visit your website you should now see the WordPress installation screen. Select the language you want to install WordPress in and proceed to database configuration.

    How to Install WordPress Manually on Webhost

    Fill in your corresponding database details; the database name, the username, password and host. Please note the host name always remains localhost. It is localhost since it is the relation between the installation and the database, they are both located in the same server thus localhost. This may also vary in rare circumstances where the host provides a database URL or host IP.

    How to Install WordPress Manually on Webhost

    4) Run WordPress Installation

    After filling in your database configuration settings, proceed, if they are correct you should now see the WordPress installation page.

    Now fill the details about your site, the site name, admin email, username and password then run WordPress installation.

    fill in details

    5) Test Your Installation

    When you have completed installing WordPress manually on your web host, you should now test to see everything is working well. Get the logins from your admin email or where you saved and go to WordPress login screen and login to test your site. If you followed everything correctly, you should now have a functioning WordPress installation on your domain or subdirectory.

    How to Install WordPress Manually on Webhost

    Subdomain WordPress Installation and .htaccess

    To install WordPress manually on a subdomain, you should follow the same steps the only difference is the location of your WordPress files. Instead of uploading WordPress to site folder – public_html/yoursitefolder.com you should upload to the subdomain folder something like public_html/subdomain.yoursite.com

    Finally, you may encounter some 404 errors when you install your site on a subdirectory like I did. To solve these errors it may be important to ensure your .htaccess file looks like this:

    Please not there is the subdirectory name in the .htaccess indicating the paths of your URLs. You can learn more on how to configure you .htaccess from Ultimate WordPress .htaccess Guide.

    Install WordPress Manually via FTP

    How to Install WordPress Manually on Webhost

    The process of installing WordPress manually via FTP is largely the same as that of control panel. You should first create the database via the Cpanel.

    Then upload the file through FTP to your respective site folder. Finally run WordPress installation process just like that of control panel. The only difference between the two methods is how files are uploaded to your server. To login to your FTP check the ftp account details from you web host panel

    How to Install WordPress Manually on Webhost


    We have successfully installed WordPress manually on web host using the control panel and also using FTP. You too can use these five steps to install WordPress on your web host if you want to be in control of things and don’t want to use the quick WordPress installers. The process of installing WordPress whether on localhost or on web host is largely the same, since you need to first create a database then link it up with WordPress.

    I hope this article has enlightened you on how to install WordPress manually on the web host. If you have further questions, compliments or want to seek clarification, please leave us a comment.

    10 Best WordPress Plugins for Developers

    Best WordPress Plugins for DevelopersAll plugins are not created equal in the eyes of developers! This may sound as an outrageous statement but there WordPress plugins that score highly especially in  developers’ community.

     WordPress plugins for developers are rated highly by developers since they help make their work easier. I have researched  found these 10 WordPress plugins that stand out as the most useful plugins for developers.

    Best Plugins for Developers

    1) Theme Check

    plugins for developer _5Theme Check is a plugin that best helps developers rate their themes against the WordPress theme coding standards and the best practices. This plugin checks your new theme against the current coding standards and all the requirements for the theme to be functional. It checks the files like theme screenshot, author information and licenses. If you want to develop themes that are up to WordPress standards this plugin is a must have. It helps you keep up with the WordPress coding standards without worrying of likely mistakes in your code.

    Download Theme Check

    2) User Switching

    10 Best WordPress Plugins for DevelopersUser switching can be described as developer best time saver. Ever wondered how to quickly login and logout from your WordPress site in order to view how other viewers see your website? You don’t have to keep logging in and out of your site, you can now use this plugin to switch between different users, saving you a great deal of time. This plugin allows you to switch between registered users without having to login in and out. When you install and activate, you will see new menu on the WordPress admin bar called Switch off. With a click on a button you can easily and quickly switch WordPress users.

    Download User Switching

    3) Query Monitor

    plugins for developer_1Query Monitor is a plugin for every developer who wants to make debugging an easy task. This plugin has advanced features that you will not see in other debugging plugins and it is absolutely useful for debugging both plugins and WordPress themes. This plugin adds a toolbar on your admin bar and will continually show you query data such as Ajax calls, Php errors and HTTP requests. You have to try this plugin to appreciate its ability to making debugging easier for both novice and experienced developers.

    Download Query Monitor

         4) RTL Tester

    10 Best WordPress Plugins for DevelopersIf you are a WordPress theme developer they may appeal to a wide range of clientele across the globe. One of the communities of users you need to pay attention to, are those that read and write from right-to-left, commonly abbreviated as RTL. RTL tester was created just for this kind of assistance, this plugin adds a button to your site admin bar and you can switch the content between left and right text direction. It is useful for testing WordPress theme and plugins with right to left (RTL) text direction.

    Download RTL Tester

    5) Debug Bar

    plugins for developer_3Debug bar is another exceptional debugging plugin that adds a debug menu on your WordPress admin bar that displays cache, query and important debugging information. I like this plugin since I can tell from a single click the total queries, total queried time and memory usage that is absolutely useful for debugging. This plugin also shows you Php warnings and notices but you need to ensure your WordPress error reporting is enabled in wp-config.php

    Download Debug Bar

    6) Regenerate Thumbnails

    plugins for developer_6Regenerate thumbnails allow developers to regenerate all the thumbnails from image library in the new sizes that they prefer. With a single click you regenerate all the thumbnails something that save time that would be spent generating one thumbnail after another. If you are looking for a perfect solution to regenerate thumbnails as you develop themes, this plugin should be your first choice!

    Download Regenerate Thumbnails

    7) Log Deprecated Notices

    plugins for developer_7WordPress is continually evolving and some functions get deprecated with each WordPress version update and following all these deprecated functions can be an uphill task. After all you have all the time to spend on this kind of task while there is a plugin that can help you know what functions have been depreciated. This plugin lists all the deprecated function when they are found in a theme or plugin. It also offers you alternatives making it developer’s best friend.

    Download  Log Deprecated Notices

    8) Debug this

    plugins for developer_8This plugin allow developers to see the frontend of a WordPress installation through the admin bar and has forty nine debug modes. You can render page analysis for both CSS and JavaScript, you can debug menu, widgets and sidebars. It has variety of Php modes that include defined functions, constants, classes among many more. It helps you to save time by allowing you to surface any WordPress or PHP server data without having to hardcode debug scripts or run complex tests.

    Download  Debug this

    9) Developer

    plugins for developer_9This is the ultimate plugin for testing your WordPress development environment. This plugin checks and ensures that your development environment is configured correctly including the plugins, constants and other settings. This plugin helps developer develop by optimizing their environment and ensuring essential tools and plugins are installed.

    Download Developer

    10 Advanced Custom Fields

    Best WordPress Plugins for DevelopersAdvanced Custom Fields plugin is a perfect solution for any developer looking for a way of building content management system on WordPress easily and fast. It helps you create multiple visual fields and you can select from a wide range of input types like text, textarea, image file, links, post object, radio buttons, date picker, gallery among many more features. This plugin helps you build a CMS without having to code many files; it utilizes native WordPress custom post type and offers a limitless solution for creating flexibility in WordPress.

    Download Advanced Custom Fields


    There are millions of plugins out there that are useful to developers but these 10 are an absolute necessity for any WordPress developer. These plugins help WordPress developers in saving time during development and debugging. I would recommend these plugins to any developer who wants to be on top of their game. This is my list of the best WordPress plugins for developers, I would like to hear from you about plugins that you find useful in your day to day web development work. Please leave me a comment about your favorite plugin for WordPress development and debugging.

    Ultimate Guide to WordPress htaccess

    Ultimate Guide to htaccess If you have not heard of htaccess before, you are missing a great deal of knowledge on how to make your WordPress security better. This is a very important file that ‘lives’ in your WordPress installation folder and controls a great deal of things happening in your site. In simple words htaccess is the gatekeeper of your WordPress installation. As you will find out, you can lock intruders out of your site using WordPress htaccess and also control how search engines interact with your site. Let’s get started by understanding what the roles of htaccess are and how you can change the different settings on this file.

    What is .htaccess File?

    This is a distributed configuration file that is located in your WordPress installation root and handles configuration changes in Apache (server) based on a particular site directory. WordPress utilizes .htaccess to manipulate how Apache (server) serves the files located in the site directory in which the .htaccess resides.

    To locate your site’s .htaccess login to your site Cpanel or FTP and navigate to your site directory. Ensure you choose the option to see all the files including the hidden file to locate the .htaccess file. Some hosting environment may hide .htaccess; you need to enable the feature for hidden files in the directory settings:

    Ultimate Guide to WordPress htaccess Your site’s htaccess controls the Web Server (Apache) and is regarded as the most powerful configuration file since it has the capability to control access of the WWW's HyperText Transfer Protocol (HTTP) with a password, control 301 Redirects, and rewrites to just mention a few capabilities of htaccess.

    WordPress uses this .htaccess file to manipulate the way that URLS of your site work both in the root directory and the subdirectory WordPress installation. As you will see in this tutorial, htaccess can solve a great deal of WordPress permalink problems. The basic WordPress .htaccess file contains the following rules:

    Locating Hidden .htaccess File

    When editing .htaccess you will note that the name is written with a dot preceding the name. This simply means this is a hidden file and it may be difficult for some people to locate the .htaccess. You can use a simple FTP trick to force the .htaccess to visible. In Filezilla go to server menu and click on the bottom option to force showing hidden files.

    Ultimate Guide to WordPress htaccess

    Login in now into your site and now navigate to the remote directory and you should now locate the htaccess that was hidden:

    Ultimate Guide to WordPress htaccess If you are accessing the site directory via the Cpanel, you should click on the Files icon then open browse to the site directory. Ensure you check the option to view hidden files:

    Ultimate Guide to WordPress htaccess In rare occasions like I encountered working on a client’s website, the .htaccess cannot be found since WordPress has not generated it since there was permission conflict in that server. In this case when you go to WordPress Dashboard > Settings > Permalinks, you will see the notice that your .htaccess is not writable and a suggested .htaccess that you need to add to your site directory.

    Ultimate Guide to WordPress htaccess To solve this problem you will be required to save this code as .htaccess and upload it to your site directory via FTP. In some occasions there might be permission issue and you need to reset the permissions via FTP. It’s faster easier and effective. Just locate the .htaccess and right click, you will see the option to change file permission. You should set it to 755 then save and upload the file.

    Ultimate Guide to WordPress htaccess To understand how these permissions work and why you need to change them, I would recommend you review changing file permissions.

    Creating and Modifying WordPress .htaccess

    When you have located WordPress .htaccess and opened it, you should place the rules outside the start and end comments of the htaccess. The start and the end are marked by the comments as shown below.

    If you are updating this .htaccess file you should not add configuration directives between the two comments since it is likely to be overwritten by WordPress.

    Creating .htaccess file for WordPress

    To create .htaccess file for WordPress you should open your text editor like notepad and add the rules of the .htaccess.

    When you are done save the file as normal text file like htaccess.txt then upload it to your site root directory and rename it to .htaccess.

    Editing WordPress .htaccess via FTP and Cpanel

    There are many ways to edit .htaccess in WordPress the most common being through the FTP. To edit .htaccess through FTP download the file and edit it, save it and upload it back.

    Editing through the Cpanel requires you log in and locate the file and edit it as a usual file. It important to always backup the .htaccess before you can start editing.

    Editing .htaccess using a Plugin

    There are WordPress plugins available for editing .htaccess without having to login to the Cpanel or FTP. One such plugin that is useful for editing .htaccess is WP Htaccess Editor.This plugin is my favorite since you can easily edit your .htaccess inside your WordPress dashboard. It also creates a backup for you to restore if the editing goes wrong.

    15 Useful .htaccess Snippets for Security and Optimization

    When you are editing .htaccess, you need to first backup this file since you need to restore it if you make any mistakes. The following are some .htaccess hacks you can implement in your site’s .htaccess:

    1) Restricting Access to wp-config.php

    This is the first step to keeping hackers completely out of your site. You can add the in your .htaccess:

    2) Restricting Access to .htaccess file

    To protect access of your WordPress .htaccess file by hackers you should add the following snippet in your .htaccess file:

    3) Stop hot-linkers in their tracks!

    There are a number of people who burn your bandwidth by hotlinking on the images in your website. This can slow down your site especially when you are using running a large site. You can stop this by adding the following snippet to your .htaccess:

    4) Stop WordPress Directory Browsing

    Most web server like Apache allow directory browsing by default this can be dangerous since hackers can look for vulnerability in any of the WordPress files in the directory.

    Ultimate Guide to WordPress htaccess

    To stop directory browsing in WordPress just add the following line in your .htaccess:

    The result should be as seen in the image below:

    Ultimate Guide to WordPress htaccess

    5) Lock Access to WordPress Admin

    You can stop anyone accessing WordPress admin by adding a snippet in your .htaccess and creating .htpasswds file. Generate the .htpasswds file from this generator. Save it as .htpasswds and place it in your site directory outside the public_html folder:

    Ultimate Guide to WordPress htaccess For this illustration I am using the localhost. For a web server you should place this file outside public_html. Then we should add the following code to the .htaccess file:

    Remember to replace your username and respective server path. Then visit your WordPress admin page to test and see if it is effective. If you did everything correctly you should see the authentication login prompt ads follows:

    Ultimate Guide to WordPress htaccess 6) Ban Spammers and Bots IP Address

    You can use WordPress .htaccess to ban certain IPs from accessing your site. You just need to add the following code to your .htaccess:

    Replace the xxx.xxx.xx.x with the IP address of the spammer you want to ban from your site.

    7) Optimize your site with GZip Compression

    One of the effective ways to save bandwidth and speed up your site is compression. To implement Gzip compression and optimize your site for high speed load add the following code to .htaccess

    8) Limit File uploads to 10MB

    When you are dealing with a membership site, or site users upload content, you may find it useful to limit the size of the uploaded files. This can be done by adding the following code in your .htaccess:

    9) Limit the Login by IP Address  

    You can use .htaccess to protect WordPress admin area simply by limiting access to your IP and other selected IP addressed to do this use the following snippet :

    10)Redirect Visitors to Maintenance Page

    To redirect visitors automatically to maintenance page use the following snippet in your htaccess:

    11) Redirect Permalinks

    When you set the permalinks to /%postname%/ and want to redirect the other permalinks to that format you can use the following snippet in your .htaccess:

    12) Creating 301 Redirects for old URLS

    You can utilize 301 redirects to tell your users the page has been moved to a new location. To redirect users using the .htaccess from one old URL to another we should use the following snippet in the .htaccess:

    13) Customized HTTP 404 error page

    If you want to create custom 404 error redirects use the following snippet code:

    14) Protect Plugin files from Access

    WordPress plugins can be exploited by hackers to access your site. To prevent access to your plugin files use the following code in your .htaccess:

    15) Auto-Correct Spelling of URLS

    You can auto-correct spelling mistakes in your URL using the following code in your .htaccess:

    WordPress .htaccess in Sub-directories Installations

    The WordPress .htaccess in installation in sub directories tends to change from the default file. There are instances where the installation uses the parent htaccess resulting is several 404 pages for the directory site. To solve this problem your subdirectory WordPress installation should always have the .htaccess as follows:

    You should replace subdirectoryname with the name of your directory and place this htaccess file inside the folder where your WordPress installation is located.

    Example if the subdirectory of WordPress installation is named demo, the .htaccess should look like this:

    WordPress .htaccess in Multisite

    This applies for Multisite running on WordPress 3.5 or later, uses either of these htaccess files depending on how you have installed the multisite, it can either be a subdirectory or subdomain based multisite:

         Subfolder Multisite

         SubDomain Multisite

    Hacked Sites: Automatic Reset .htaccess File Permissions to 444

    I have also previously experience a common scenario where the permissions revert back to default 444 after changing them as illustrate above. This shows that your site is possibly hacked and has some malicious code or backdoor pages that keep changing the .htaccess permissions back to the default 444. It is highly advisable you take the following steps to clean up the site and secure it:

    You should immediately take the site offline and change permissions to 600 for the main site folder.

    You should then rename the site folder and create a new folder with the name of that folder. Example if hacked site folder: jengah.com rename it to old_njengah.com then create a new folder name it njengah.com

    Put your site in the maintenance mode by placing the file named .maintenance in the folder, you can add your own html code in the file to display a message that your site is offline for a few hours.

    Download the latest version of WordPress and replace the old wp-includes and wp-admin folders with the freshly downloaded version. This is intended to clean the WordPress core of the malicious code or backdoor pages.

    Replace all the other files apart from wp-config.php with the freshly downloaded WordPress files and rename it back to its original name.

    Install a WordPress security plugin like Sucuri or Wordfence and scan your installation for any other malicious code. When you are done your .htaccess should be back to normal.


    I hope this comprehensive tutorial of WordPress .htaccess is absolutely helpful to you in understand the role of .htaccess in WordPress and how to manipulate it. I would like to hear your thoughts, comments, compliments or further questions regarding this topic. If you would like to get in touch, please do not hesitate to leave a comment.

    Fixing Database Connection Error in WordPress

    Error Database Connection - Featured ImageDatabase connection error in WordPress is fairly common unlike other errors such as WordPress white screen of death and plugin conflicts. When you encounter database connection error in WordPress, you should not panic since it is an error you can easily fix. To understand why database connection error occurs in WordPress, you need to know how WordPress works!

    WordPress is a Php application that utilizes MySQL database to store data. If you have seen how to install WordPress on localhost – Xampp or WampServer, you will note that WordPress only works when the database configuration is right.

    WordPress used SQL database to store data, every time you publish a post, create a page or add media to WordPress it is stored in the database. When visitors come to your site, WordPress queries the database and returns the data:

    Fixing Database Connection Error When you get this database connection error, it means WordPress is not able to communicate with the database. The flow of information illustrated in the image above has been interrupted resulting in database connection error.

    To understand how this process of communication between WordPress and database occurs, you need to know the role of wp-config.php file.

    How Database Connection Works in Php

    When connecting to a database in Php you require the username, password and the database host. To connect to the database you need to specify the values for the host, username and password. In Php you can connect to MySQL database using the following code:

    In this connection query when the connection is not successful the script shows database connection error. WordPress also utilizes this kind query to relate with the SQL database.You can use this code to test if your database connection details are correct.

    This connection is contained in the wp-config.php file. To locate wp-config.php file in your server, you need to go to Files > public_html > WordPress Installation Folder (example.com) > wp-config.php:

    Fixing Database Connection Error When you open the wp-config.php file, the first thing to look for is the following code that connects the database and WordPress.

    This code is basically Php constants that define the values of WordPress database. You should ensure these values defined in each of these constants are correct. If any of these values is wrong, it results in a database connection error.

    Testing for Database Connection in WordPress

    To test these database values, we need to use the Php database connection code I shared earlier in this tutorial. The if statement tests the connection details, I have simplified it as follows:

    Replace the database host, username and password with the respective values. You should then save this file as dbtest.php and check on your browser to see the results.

    Fixing WordPress Database Connection Error Check the URL below and see if the database connection is working. If it is working you should see:

    WordPress Database Connection Error Causes and Solutions If your database connection details are wrong, this connection will not be successful and will immediately show to a Database connection error. I changed the settings to just illustrate what happens when the database connection details are wrong:

    WordPress Database Connection Error Causes and Solutions

    The database connection error occurs and you get the details about the error. As we have experienced in this example the leading cause of database connection errors in WordPress is faulty database connection details.

    Let’s look details at the different causes of database connection error and how to resolve this error.

    WordPress Database Connection Error Causes and Solutions

    Cause 1: Wrong Database Connection Information

    This code above is basically Php constants that define the database name, database host, username and password values. You should ensure these values defined in each of these constants are correct. If any of these values is wrong, it results in a database connection error.

    When installing WordPress after creating a database via MySQL wizard or Phpmyadmin, you get the database name, username and password. You should ensure these values correspond with what you have in your wp-config.php. This is the most common cause of WordPress database connection error.

    WordPress Database Connection Error Causes and Solutions When you experience a persistent database connection error, one of the possibilities is the fact that these values are not correct. It happens when your site is hacked and the WordPress installation is compromised.

    This happened to one of my clients; they just noted all their sites were showing database connection error. On looking at the WordPress installation, the wp-config.php database connection values were all empty, something like:

    WordPress Database Connection Error Causes and Solutions

    If your database details are empty or are not working you should create a new database and test your WordPress installation with the new database. Also check in the Phpmyadmin if your database is present. If the database is present and the database connection error is persistent, the next possible cause is a corrupt database.

    Cause 2: Corrupt WordPress Database

    When the WordPress database has been corrupted the database connection error occurs. MySQL database can be corrupted by many causes among theme; server crash, failure in the database hardware and MySQL bugs. A corrupted database can contain damaged tables and can be repaired without permanent dames to the entire database. One of the most used ways of dealing with corrupt database is restoring from a backup. Before we consider recovering from a backup, let’s learn how to repair corrupt databases in WordPress.

    Open your wp-config.php file and go to the part that defines your database name, username, password and then host. Check below that code for the following line of code:

    If you cannot see it in your wp-config.php file, you need to add it below the database configuration section.

    Fixing WordPress Database Connection Error

    After inserting the line of code or turning the Boolean value to TRUE. It is now time to start the database repair process.

    Go to this URL in your site:

    This will bring up the page that as two buttons for ‘Repair Database’ or Repair and Optimize Database’

    WordPress Database Connection Error Causes and Solutions Choose either option but I prefer the second option to repair and optimize the database. When the process is complete you should go back to wp-config.php and delete the code. Presence of this line of code in your wp-config.php can compromise your database security.

    If the database connection error was caused by a corrupt database, it should work now after the database repair.

    Cause 3: Wrong Database Host

    One of the most common questions people ask about WordPress database configuration is about the value ‘localhost’ for database host. This is usually the case for most hosting environments; where the localhost specifies that the server is within the same environment thus the use of ‘localhost’.

    When you migrate WordPress site to new host and database connection error occurs another possibility is that the database host is not localhost. You may come across hosting companies that use hosting IPs or MySQL database URL for the host. In such a case you should substitute the database host with the respective value instead of having it as localhost.

    WordPress Database Connection Error Causes and Solutions

    Check with your hosting company if the database host is defined as localhost, if you cannot find any other reason causing database connection error.

    Cause 4: Slow Server in Sharing Hosting Environment

    WordPress Database Connection Error Causes and Solutions The final cause of database connection errors is when the server resources are used above the limit. This is common in shared hosting since the database performance is slowed leading to database connection error.   If you are experiencing database connection error and running the site on a shared hosting, it may be good to review your hosting usage.

    You can also delete some files from your site, upgrade your hosting plan or move host to solve this problem. Caching, reducing plugins load and using content delivery networks can be good alternatives to speeding up your site and averting occurrence of database connection errors caused by overload.


    These are the main causes of database connection error in WordPress. Although these are the main causes of this error, there may be other causes. It is therefore advisable to always backup your database regularly so that you can restore it if everything else fails.

    I hope this article helps you understand the causes of database connection error and how to solve them. If you have additional comments, compliments or questions related to this topic, please do not hesitate to get in touch by leaving a comment.

    This happend on WordPress 4.4 Update with 2.7 and is still on the 2.7.6 with plugin updated…

    Thanks for your help.

Viewing 1 replies (of 1 total)
  • Roman
    Post count: 2539
    Been thanked: 29 times
    #23065 |

    new version is available..thanks for your patience

Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.