Category Archives: WordPress

How To Translate a WordPress Plugin Into your Local Language

How To Translate a WordPress Plugin Into your Local Language

As you already know that WordPress is an open-source platform and it is translated into many languages by different contributors. Most plugins are already translated into different languages. But if you find a plugin that is not already translated into your local language, you can translate that plugin yourself. You don’t need to be technical in order to translate a WordPress plugin into your own language.

Continue reading
How to integrate a WordPress blog in your existing website

How To Integrate A WordPress Blog In Your Existing Website?

WordPress is amazing in its nature. You can convert it into anything and integrate it with any PHP website. You can even set the degree of integration. You may only need a few WordPress features when integrating it with your website. For example, you want to display the recent blog posts on your website’s homepage. Your website is in PHP, and a WordPress blog is installed in another folder. In this article, we’ll guide you through the steps to achieve this awesomeness by integrating a WordPress blog into your existing website.

Before starting with the steps to educate yourself on the integration of WordPress Blog in your website, one must know what this web publishing software basically does. And why do you really need to make a WordPress blog after all? So the answer is, why not? As the WordPress blog manages the website content beautifully.  To use this, you don’t need to be a developer or coder. However, for WordPress, there are plenty of auto-installer web hosts that are just one step away and run this easy platform.

So let’s review the suggested steps to integrate a WordPress blog into your existing website and create a beautiful WordPress blog page!

Step1

Let’s assume you already have a site running at http://www.yourwebsite.com/ and you want to start a blog for your Product.

Step2

Create a new subdirectory (folder) at your site and call it ‘blog‘. So you now have an empty sub-directory at http://www.yourwebsite.com/blog/.

Step3

Now, download the WordPress framework and upload all of its files into http://www.yourwebsite.com/blog/ and install WordPress on it. If you don’t know how to install WordPress, please read this tutorial.

So, at this point, you have installed WordPress in the blog directory and want to show the recent blog posts on your website’s homepage.

Step4

You need to add the following code snippet at the start of the home page in which you want to utilize WordPress functions.

<?php 
define('WP_USE_THEMES', false);
require('blog/wp-blog-header.php');
?>

Step5

Then the next important thing is the ‘WordPress loop’. If you’re unfamiliar with the ‘WordPress loop, please read this here.

Put the following code anywhere on your homepage where you want to display the latest posts.

<?php

$number_of_posts = 5;
$args = array( 'numberposts' => $number_of_posts );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent_post ){
echo "<span>".$recent_post['post_date']."</span> <br>";
echo "<h3>".$recent_post['post_title']."</h3>";
echo  "<p>".$recent_post['post_content']."</p><br><br>";

}

?>

Pretty simple, isn’t it? This way, you can utilize all the functionality of ‘WordPress’, but you should have a basic understanding of how things are done in ‘WordPress’.

If you are having any difficulties while integrating your website with a WordPress blog, please feel free to ask below in the comments section.

Thanks, Good luck!

How to make WordPress database secure by changing default WordPress table prefix?

How to make WordPress database secure by changing default WordPress table prefix?

WordPress Database Security is the most important thing. Every single piece of information stored in it, which makes hackers and bots to target for stealing information by applying SQL Injection.

WordPress Database uses a default table prefix value “wp_” for all of its database tables. Typically, every website that is running WordPress will have its database tables with this prefix and this can surely be used by the hackers or malicious bots to guess your database table names. That’s why the smartest thing to do while creating a WordPress website is to change the prefix of the database, which can be done easily.

If you forgot to change the prefix of the database table while creating your WordPress website, you can do this now by following these simple steps.

Note: It’s recommended to backup your database before performing this task.

There are two simple steps you need to follow:

Step 1. By changing the wp-config.php file:

  • Go to your WordPress root directory and search for a file named “wp-config.php”.
wp-config.php file
wp-config.php
  1. Open “wp-config.php” in any code editor and search for “$table_prefix  = ‘wp_’;”
  2. Change “wp_” prefix to something like “Br1G@de” or anything you like.
WordPress database table prefix
Table Prefix
Note: Only alphabets, numbers and underscores.

Step 2. Change database table names:

Now you need to access your database using phpMyAdmin and change the table name’s prefix with the new one we entered in “wp-config.php” file.

You will find the phpMyAdmin link in cPanel under Databases section.

phpMyAdmin Database
phpMyAdmin

By default there are normally total 11 tables listed

WordPress Database Default Tables
Default Tables

Select the SQL tab and run the simple queries and use the prefix you add in “wp-config.php” file.

RENAME table `wp_commentmeta` TO `Br1G@de_commentmeta`;
RENAME table `wp_comments` TO `Br1G@de_comments`;
RENAME table `wp_links` TO `Br1G@de_links`;
RENAME table `wp_options` TO `Br1G@de_options`;
RENAME table `wp_postmeta` TO `Br1G@de_postmeta`;
RENAME table `wp_posts` TO `Br1G@de_posts`;
RENAME table `wp_terms` TO `Br1G@de_terms`;
RENAME table `wp_term_relationships` TO `Br1G@de_term_relationships`;
RENAME table `wp_term_taxonomy` TO `Br1G@de_term_taxonomy`;
RENAME table `wp_usermeta` TO `Br1G@de_usermeta`;
RENAME table `wp_users` TO `Br1G@de_users`;
 Note: If you have plugins installed, you have to make changes to those tables as well same we just did it with default WordPress tables.
how to setup HTTPS in wordpress site

What is HTTPS and How to Setup HTTPS in WordPress Site?

One of the most important features which you should have to ensure that your WordPress website is secure and safe for those users who want to exchange their important information on your website while shopping or doing other stuff. Setting up your WordPress website to force use the most secure transaction system is not that difficult to implement, but it needs a lot of decision making when to enforce a secure transaction process for the user.

You would have seen on some websites, their URLs starting with “HTTPS” like Facebook, Google, and many others. An “HTTPS” enabled websites to add a security layer to the data communication between your computer and the server. The data communication is encrypted with an SSL (Secure Sockets Layer) certificate.

The next question in your mind will surely be “Why do you need it?”.

Any sensitive information like your credit card details, your passwords, or anything which could be called sensitive, needs to be safe whenever it is sent towards the server so that nobody between you and the server you are interacting with can get it. That’s why most of the shopping sites don’t use “HTTP”. The next important question is how you can enable SSL on your WordPress site. It is very easy.

Setting up your WordPress site with HTTPS:

First, you have to purchase an SSL certificate for your site and install it on your domain. Then go to the WordPress admin and open the settings page. There you will see these two text fields.

wordpressURL fields

Just change your URLs by putting adding “s” after “HTTP” and save it. The next step is to open your “.htaccess” file which is residing in the root of your WordPress and put this code into that file.

RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*)  https://%{SERVER_NAME}/$1 [R,L]

Let me explain the above code.

First-line will check whether the URL which has been entered by the user is having “HTTPS” or not and will be true if it is not having “HTTPS”.

In this part “https://%{SERVER_NAME}/$”

{SERVER_NAME} = “domain name”
^/?(.*) = “the slash is representing that slash, which is coming after the domain name and? (.*) means nothing or everything”
$ = “this variable will be having everything user entered after the domain name”
In “[R, L]”, “R” means redirect, and “L” means this was the last rule so stop further processing.

Save your “.htaccess” file and you are all done. Stay safe.