Skip to main content

WordPress Movie Rating Plugin Development From Scratch

We will build two WordPress Movie Rating Plugins from scratch.

Final Project on Github: BG Movies: Main Movie Rating WordPress Plugin
https://github.com/kirandash/bg-movies

BG Movies is a plugin that creates a custom post type for movies that admin can publish straight on their website. It also allows guest users to rate the movies and also allows them to post their own movies for the website.

Final Project on Github: BG movie rate email: Extended plugin
https://github.com/kirandash/bg-movie-rate-email

This plugin extends the BG Movies and adds email rating functionality to it.

Let me know your feedback by leaving your comments in the comment section. And If you like my work and tutorials, please like my videos and subscribe to my channel.

WordPress Movie Rating Plugin Development From Scratch – PART 1 – Introduction

WordPress Theme Customization API

Theme customizer is an awesome feature that allows you to change theme’s settings like color, font size background image, what menu should be shown on your website etc. with a live preview.

This course series includes six videos. Hope you enjoy them.

PART 1 :

Introduction to WordPress Theme Customization

PART 2 :

Sections, Controls and Settings

PART 3 :

Coding our first setting, section and control

WordPress tips, tricks and hacks

PART 1:

Introduction to course series “WordPress tips, tricks and hacks”

Before starting with the course “WordPress tips, tricks and hacks” I would like to thank you for choosing me to train you on this topic.

Why I made this course?
When I am on the internet surfing through different awesome looking websites, most of the time I come across a feature on a website, and then I just start thinking : How can I get this on my WordPress website as well. And if you are a crazy wordpress developer then I bet you have experienced the very same feeling too. There are times when you want a feature which you just saw, but do not know where to look for the tricks, or even what tricks to look for. In this tutorial I will be sharing a few of such WordPress Tips, Tricks, and Hacks that I found very useful for myself and I can assure that you will definitely find it useful too. And most importantly it is fun. That’s why I made this course, to have some fun.

I believe that this course is for advanced wordpress developers who already have knowledge of wordpress. So, if you do not have basic knowledge of wordpress then I would strongly suggest you to learn the basics and return here.

Till today I am having 4 courses on my youtube channel and in the BG web agency website training library and this is going to be the fifth course that I will be doing. And I want to say that, I am most excited about this course as compared to the other four courses that I have here. Because this course has got everything an advanced wordpress developer needs to learn.

In every video tutorial, I will be sharing you few wordpress tips, tricks and hacks. And to show you how the trick works, I will be using some code. You can download the source code for all the videos from the official website for BG web agency. And if you have any doubt or questions or complaints, you can post them in the comment section for the youtube video or on my website.

Having said that, I hope you are now fully excited about this new course on “WordPress Tips, Tricks and Hacks”.

PART 2:

Adding sections and fields to user profile page

The user profile page is the page in the back end of a wordpress installation that helps you manage your wordpress users which includes managing admins, editors, subscribers,contributors and authors. WordPress comes out of the box with some fields that you can manage. Like the name, email and website details and etc.

But what if you want to add more fields to this form? For example say that when a user is added to your website you want the user to mention it’s designation also. Or maybe a field to mention date of birth of the user.

Well, in this tutorial I am going to show you how to do this with the help of a demo.

Download exercise files for lecture 2 :

code-wordpress-tips,-tricks-and-hacks-part2

PART 3:

the filter Hook

In this tutorial I am going to show you how to use a filter called “the_filter”. “the_filter” is as the name says a filter hook which allows you to filter anything in wordpress. In my case here, I will be filtering the content on my wordpress website.

Let me show you that with the help of a demo.

Download exercise files for lecture 3 :

code-wordpress-tips,-tricks-and-hacks-part3

PART 4:

Insert page or post programmatically

I guess you already know how to create a post or page by using the admin area of your wordpress website. In this tutorial I am going to show you how to create a post or a page programmatically. Now, you might be thinking why would you need to do that. WordPress already have a nice admin section to create posts and pages then what is the need of adding posts and pages from somewhere else. The reason is, maybe you have a scenario where you do not want a particular user to access your wordpress backend. So, what you can do is create a form in the front end of your website and through that form you can allow the user to insert a post or page programmatically.

To do this, we are going to use a function called wp_insert_post(). To demonstrate how the function works, I will be showing you a simple example to create posts and I expect you to take this knowledge further and implement with forms or anywhere you want for your project.

So, let’s jump to the demo.

Download exercise files for lecture 4 :

code-wordpress-tips,-tricks-and-hacks-part4

PART 5:

Display random posts

WordPress by default shows you the posts in reverse chronological order, which means it shows you the latest posts on the top and the older ones later.

But have you ever wanted your website to have this cool feature to display random posts every time your visitor arrives? So that each time the visitor refresh the page, it will deliver a new post. Well in this tutorial I am going to show you how to do that.

Let’s jump to the demo.

Download exercise files for lecture 5 :

code-wordpress-tips,-tricks-and-hacks-part5

PART 6:

Image thumbnails in wordpress

In this tutorial I am going to teach you how to create custom thumbnail sizes and then apply it to the featured images of your wordpress posts.

Download exercise files for lecture 6 :

code-wordpress-tips,-tricks-and-hacks-part6

PART 7:

Admin notices in wordpress

In most of my wordpress themes, I always display some guidelines or rules on backend of my wordpress website. What I do is, I display a message box right on the top of every pages in the backend. So, in this tutorial I am going to show you how to display notices on each page of your wordpress backend and then I will also show you how to write conditional statements so that the notices shows only on particular pages and not appear on each and every page.

In order to display the notices we will be using an action hook called all_admin_notices.

Let’s jump to the demo.

Download exercise files for lecture 7 :

code-wordpress-tips,-tricks-and-hacks-part7

PART 8 :

Display Relative Dates in WordPress

Have you ever wondered how to display relative dates on your wordpress website? Actually it is pretty easy.

All You would need to do is download a plugin called WP-Relative Date.

Once you have downloaded and activated the plugin, the date and time for posts on your wordpress website is automatically going to switch to relative mode.

In case you want to display the relative date or time anywhere inside of your post or in your code then you can use the shortcodes:

For relative date:

  • [relativedate date_format="jS F Y" ago_only="false"]

For relative time:

  • [relativetime time_format="H:i" ago_only="false"]

Optimise speed and security of wordpress website

PART 1:

Why webpage speed is important (Why optimise wordpress website?)

PART 2:

Website speed test tools

PART 3:

Google page speed insights

PART 4:

Image optimization

PART 5:

Optimize home page of your wordpress website

In this tutorial we will discuss of ways to increase the speed with which the home page of your website loads in your visitors browsers.

PART 6:

Database optimization of your wordpress website

WordPress uses a scripting language called PHP and uses a database to keep everything organised. WordPress website also needs its database to be tuned every now and then to keep running faster on your visitors browsers.

In this video I will discuss how to perform a basic tune up and optimize your wordpress database.

PART 7:

G-zip site compression

In this tutorial, I will walk you through the steps of compressing your wordpress website so that it will load much faster on your visitors browser.

We will be doing it using something called Gzip compression.

PART 8:

W3 total cache plugin – installation and configuration

In this video I will cover how to do basic set-up for W3 total cache plugin and get a huge increase in page speed.

PART 9:

Removing W3 total cache plugin

As we have discussed in the previous tutorial, w3 total cache plugin is a powerful tool to speed up the load time of your website.

But if you decide to remove this plugin, it is a bit of tricky task to remove all the pieces out of your website.

PART 10:

WordPress 5 minute secure installation

There are few different ways to install wordpress on your website. My goal is always to do it the easiest way but still I must know how things work, just in case when I need to fix something, I should be able to do it myself.

If you are going through this advanced course, then I guess you already know how to install wordpress but still I would like you to see this video as I will be having a couple of notes to increase security for your wordpress website.

PART 11:

Setup SecureFTP(File Transfer Protocol) for your website using Filezilla

One way of securing your wordpress website is to use Secure File Transfer Protocol or SFTP in short, for transferring files to and from your wordpress website.

In this video I will show you how to setup SFTP for filezilla.

PART 12:

Secure wordpress configuration

In this tutorial I will help you secure your wordpress website by moving your config file wp-config.php from it’s normal location where the hackers will try to find and mess with it.

WP-config.php file contains some very important informations, so before doing anything that I am going to show you in this video, I would like you to do a backup of both your files and database.

Before starting, I have to make another important note that this trick I am going to show you does not work on multi-site wordpress installs nor on sub-domain wordpress installs. This trick is good only if you have a single-site wordpress installation.

PART 13:

Choosing a secure admin username for wordpress website

If your administrative login username is “admin” then you are making the hacker’s job easy by 50% who is trying to get into your site.

So, let me show you how to create a new secure username.

PART 14:

Website hosting in a secure way

No matter what security measures you have implemented on your wordpress website, if your website is on an infected server then your website is still going to be infected.

So, always plan for the worst and hope for the best.

If your budget permits, it will be better if you can move your website to a V.P.S.(Virtual Private Server) or even better if you can move it to a dedicated server.

But most of us are on a shared hosting account. So, if you too are on a lower budget like me and want to buy a shared hosting account then there are a couple of questions that you should ask the hosting providers before making any purchase.

  1. How often do you run malware scans on the server and not just the individual accounts but on the server.
  2. Do you provide backups? If yes, how often do you take backups and are they free? If not, how much extra are you going to charge for that?

Some more questions that you can ask are:-

  1. How many domains can I host?
  2. How many email accounts I will get?
  3. What is the bandwidth limitations?

There is a tool from google that can tell if your website is infected or not.

Please copy and paste the URL below with your domain name in place.

http://www.google.com/safebrowsing/diagnostic?site=yourdomainname.com

PART 15:

Creating secure passwords for your wordpress website

In this tutorial, I will discuss how to create unique, un-guessable passwords for your wordpress website.

In order to create a password, the golden rule is to use:

  1. few lower case characters,
  2. few upper case characters,
  3. few numbers,
  4. few special characters,
  5. and the combination should be at least 12 characters.

PART 16:

Creating secure database prefix for your wordpress website

One way of avoiding bad guys(the hackers) to hack into your website is to avoid default database prefix “wp_”.

If you have not installed wordpress for your website yet then you can choose a different prefix while doing the installation process. But if you already have wordpress installed on your website then, no problem you can change it too. And this can be done either manually by you or by using a wordpress plugin. You can search for plugins if you want but I want to keep it simple.

In this tutorial I will be showing you how to edit your database prefix manually. But before starting, let me make a quick note that, you must do a full backup of both your files and database before proceeding.

Assuming that you have already done your backup let’s get started.

PART 17:

Secure clean up of your wordpress website

If you just take care of at least the basic level security for your website then you will be in much better status than people who do not.

Because wordpress hackers are not any die-hard hackers who are looking for just to destroy your website. In reality, the hackers just go through they possibly can and whichever is less secure they just hack through it.

So, let us just do the basics right and stay safe.

PART 18:

Prevent Brute Force Attacks on your wordpress website using Limit Login Attempts plugin

 

One of the ways a hacker can break into your wordpress website is by trying to guess your administrative login username and password.

They do this by using a software program that can guess hundreds or thousands of possible username and password combinations in minutes. This is called “Brute Force Attack”.

When hackers do brute force attack, the software which they use makes thousands of guesses. So, your wordpress site is going to have much load and therefore can go down for a few moments.

So you need to do two things here:

  1. Chose a secure username and password.
  2. Do not let brute force attack happen at all.

How to do that?

Please watch the video to find out.

PART 19:

Do backup – conclusion

If you have a wordpress website then it is very important that you take backup of your files and databases on a regular basis. So that when someone hacks your website, you can just delete everything, clean it and restore your backups.

With that, I will be happy to declare the end of this advanced course series.