Tag Archives: WordPress

How To Redirect Users By Their Country In WordPress?

The IP2Location Redirection plugin is a powerful WordPress tool that allows website owners to manage redirection tasks based on visitors’ geolocation, identified through their IP address. It supports country and region-based redirection to a specified URL or custom page, making it ideal for handling 301 and 302 redirects without needing expertise in server configurations like Apache .htaccess.

Common Features:

  • You can set up multiple redirection rules as needed for different countries or regions.
  • It supports IPv4 and IPv6, making it flexible for all IP addresses.
  • It helps improve SEO by reducing old or broken links.
  • You may configure logging and display custom messages for blocked visitors.

The plugin supports both IPv4 and IPv6, utilizes IP2Location’s IP geolocation data, and offers flexible redirection rules, helping improve SEO by managing old or broken links effectively.

Step 1: Install and Activate the Plugin

Start by installing the IP2Location Redirection plugin. In your WordPress admin dashboard, go to Plugins > Add New, search for the plugin by name, and click Install Now. Once installed, activate it. This plugin is highly recommended for handling redirection based on country or region using IP address geolocation.

Step 2: Configure the Basic Settings

Navigate to IP2Location Redirection > Settings in the dashboard. Here, you will configure the initial settings:

  • Default Redirection Behavior: Choose the default action, such as redirecting to a specified URL or blocking access for certain countries.
  • Geolocation Data Setup: The plugin supports both IP2Location IP geolocation BIN data and web service for geolocation lookup. If you choose to use the BIN data, download the file from the IP2Location website and upload it to your server. Make sure to update the BIN data monthly via the settings page for accurate results.

Step 3: Add Redirection Rules

Go to IP2Location Redirection > Rules and click Add New Rule to create a country or region-based redirection rule:

  • Rule Name: Give a descriptive name for easy management.
  • Country or Region: Select the country or region you want to target for redirection.
  • Redirection URL: Specify the destination URL for visitors from the selected location.
  • Redirection Type: Choose between 301 Permanent or 302 Temporary redirection.
  • Source URL: Leave it empty to apply site-wide redirection, or specify a specific page.
  • Additional Conditions: Configure optional conditions, such as user agent, referrer, or URL parameters.

Step 4: Save and Activate the Rule

After setting up the parameters, click Save Rule to activate it. This rule will now redirect users to the specified URL based on their IP geolocation.

Step 5: Testing and Verification

To verify that the redirection is functioning correctly, simulate visits from the selected country using a VPN or proxy. Ensure the visitors are redirected according to the configured rules.

The IP2Location Redirection plugin is powerful yet simple, allowing website owners to manage redirections without needing to be familiar with Apache .htaccess configurations.

How To Control Post Visibility In WordPress By User Roles, Login Status, Memberships & Password Protection?

WordPress site owners can easily acquire complete control over the visibility of posts. They can set which group of people can see what specific content on their website. This lesson guides you on making certain posts, pages, and other custom post types visible only to specific users such as logged-in users, users by their roles, and users with passwords to view the content.

How To Control WordPress Posts Visibility?

The edit screen of every post and page has a settings sidebar on the right, and there are two sections; Post and Block.

In the post section, there is a ‘Summary’ meta box that offers a visibility option as ‘Status’ on the top.

If you click the link next to ‘Status’ it shows you options to keep any post public make it private, or password protected.

How To Make Any Post Private In WordPress?

When you make any post private it becomes visible only to the site administrator and editors. Simply follow the steps:

  1. Create a new post or open any old post for editing
  2. On the right sidebar, click the ‘Post’ block
  3. Under the post section on top, click ‘Published’ or ‘Draft’ next to the ‘Publish’ option
  4. It will show you three options: Public i.e. default option, Private, and Password Protected
  5. Since you are making the post private select the ‘Private’ option
  6. Publish/Update the post and it will become private

The option makes the post private i.e. hidden from the logged-out users and visible only to the site admins and editors. These posts are hidden from subscribers, readers, feeds, and searches.

How To Show/Hide WordPress Posts Based On The User Roles?

As you can see, private posts are only visible to site admins and editors but what if you want to make certain posts visible selectively to specific user roles such as subscribers, authors, contributors, etc? You can do that also with any of the following plugins:

  1. Advanced Access Manager – The plugin enables you to manage access to your website content for any user role, individual user, or visitor. It also allows you to configure the default access to all posts, pages, custom post types, categories, and custom taxonomies.
  2. Membership Plugin – Restrict Content – The plugin offers you complete control over who can and who cannot view any content on your WordPress site. 

How To Password Protect Any WordPress Post?

  1. Create a new post or open any old post for editing
  2. On the right sidebar, click the ‘Post’ block
  3. Under the post section on the top right, click ‘Published’ or ‘Draft’ next to the ‘Status’ option
  4. It will show you three options: Public i.e. default option, Private, and Password Protected
  5. Since you are making the post password-protected select the ‘Password Protected’ option
  6. It will ask you to enter a password, enter the password you like to keep on post
  7. Publish/Update the post and it will become password-protected

Now you can share the link and password with those whom you want to read the post. Only the post title will show up on the home page and other archive pages and it would look something like this: Password Protected: Title of the Post.

It will also show this message in the post content area: “This content is password protected. To view it please enter your password below” and a field to enter the password of the post.

Unlike private posts which are completely hidden from logged-out users, a password-protected post shows the title of the post in the way mentioned above.

Now the question arises, is it possible to hide the title and password field of the password-protected post on home and other archive pages? Yes, you can do that also.

How To Hide Password Protected Post Titles From Home & Other Archive Pages In WordPress?

As we have discussed above, when you password-protect any post, the front end of the website shows the post title and a password field so that users with a password can view the post. Now if you want to hide this title and make it visible only to the users with a link and password then follow these steps:

  1. Navigate to Plugins -> Add New page to find and install WordPress Hide Posts, plugin
  2. Upon activation, visit Settings -> Hide Posts page to select where you want to use the plugin such as on posts, pages, or other content types
  3. Now open the password-protected post for editing
  4. Navigate to the ‘Hide Posts’ meta box on the right sidebar
  5. Tick where you want to hide the post such as on the home page, category pages, tags pages, search pages, and other archive pages, etc
  6. Update the post and now the protected title and password field will also be hidden on the front of your website. Only the users with a link would be able to enter the password.

How To Hide Any WordPress Post From Home, Category & Other Archive Pages?

The plugin mentioned above is not just for hiding password-protected posts but it allows you to hide any posts from the home page, category page, search page, tags page, authors page, RSS Feed, REST API, Post Navigation, and Native Recent Posts Widget, etc.

Simply install and activate the WordPress Hide Posts plugin then follow these steps to hide any post:

  1. Visit Settings -> Hide Posts page to select where you want to use the plugin such as on posts, pages, or other content types
  2. Now open the post (you want to hide) for editing
  3. Navigate to the ‘Hide Posts’ meta box on the right sidebar
  4. Tick where you want to hide the post such as on the home page, category pages, tags pages, search pages, and other archive pages, etc
  5. Update the post and the post will get unlisted from the archive pages that you have selected

So these were all important parts of controlling the visibility of posts and pages on your WordPress site.

How To Show/Hide WordPress Menus With Conditional Statements?

You can use each item of WordPress menus with your conditional statements. The plugin allows visibility features to all WordPress menus you manage from the dashboard’s appearance section. It allows you to display or hide menus based on conditional statements such as show/hide this menu if the page is a single page, if a user is logged in etc.

To start, first install and activate the If Menu plugin then visit your area Dashboard -> Appearance -> Menus page and select a menu from the ‘Select a menu to edit‘ drop box. [Read: How To Create & Manage WordPress Menus?]

Let’s say you want to add a ‘Login’ link in your navigation menu but you want to show it only to logged-out users (as it is of no use for logged-in users) then first add the custom login to your menu structure and tick ‘Enable Conditional Logic ‘ checkbox.

As you tick this option it starts showing a show/hide dropdown box with if conditional logic options as shown in the given screenshot. Now select a show or hide option and then choose your visibility conditions.

How To Use Conditional Statements With WordPress Menus?

In the above example, we have selected the hide option with the conditional statement ‘if a user is logged in’ to make the login button automatically disappear for all logged-in users. Alternatively, in the above-given case, we can also use the ‘show’ option for all ‘logged out’ users.

The plugin lets you set basic visibility rules such as the user is logged in, its user role, the page type (front page, archive page, search page single page or post), or the visitor device is mobile. It also offers a premium version with an advanced set of visibility rules such as the visitor’s location, visitor’s language, based on WooCommerce subscriptions or memberships, his WishList, and its subscription level.

How To Create & Manage Menus In WordPress?

In a website, menus are the set of content filter links typically placed horizontally at the top of a website to provide easy navigation. A Menu shows what you are offering on your website.

For example: If you are running a blog on recipes then you can use navigation for offering various dish types like separate menus for dishes, soups, desserts, fast foods, detox meals, etc. In this lesson, we will guide you to the WordPress menu system covering all its important parts so that you can create new menus and add them to specific locations.

Different themes provide you with different menu locations and by default most themes use the page links in navigation menu locations. The reason is generally users create a website with typical pages like About, Contact, and Home, and a blog page. Hence these pages are shown automatically in the menu bar.

But WordPress allows you to create custom menus containing links to pages, categories, and other specific links. So if you don’t want to display pages in a menu location then create menus and assign them to display on a menu location that your theme provides.

How To Create A WordPress Menu?

Step-1: Creating A New Menu

How To Create Menus In WordPress? 1

To create your first WordPress menu, log in to your WordPress admin area (yourdomain.com/wp-admin) then navigate to Appearance -> Menus page, click the create a new menu‘ link, give your menu a name (this is not visible on the front) and click ‘Create Menu‘ link.

Step 2: Adding Menu Items

How To Create Menus In WordPress? 2

After the menu is created, you can add menu items from the left column to the menu structure box. Example: For adding a custom link:

  1. Click ‘Links’ (on the left column)
  2. Type or paste the link
  3. Type link text
  4. Click the ‘Add to Menu‘ button.

Step 3: Creating Multilevel Menus

How To Create Menus In WordPress? 3

After creating navigation links, you can drag-drop to reorder them. You can make navigation go deep by adding submenus. To add a submenu, simply drag and place a menu item a little bit right to its parent as shown in the given screenshot.

Here are the steps to create sub-menus:

  1. Position your mouse over the ‘child’ menu item.
  2. While still holding your left mouse button, drag it to the right and release the mouse button.
  3. You can repeat these steps for each sub-menu item then click the Save Menu button visible in your Menu Editor.

Step 4: Set The Menu Location

How To Create Menus In WordPress?4

After the menu structure is created, assign it to a theme location. Scroll down to the ‘Menu Settings‘ section and choose a theme location.

[heading size=”17″]Step-5: See How It Looks[/heading]
How To Create Menus In WordPress? 5

Visit your website’s home and see what it looks like. Given screenshot shows the menu we have created in the top primary location of the Twenty Fourteen WordPress theme.

How To Manage Multiple Menus?

You can create several menus, and assign them to different locations. If you are using the default Twenty Fourteen then you can add a menu on the top of your website, and another menu in the left sidebar’s vertical menu location. WordPress also provides you a menu widget (in Appearance -> Widgets page) you can use for manually displaying any menu in your sidebar or footer widget area.

How To Create Menus In WordPress? 6

How To Create Menus In WordPress? 7

To manage your menus, menu items, their structure, and location, visit the Appearance -> Menus page and select a menu to edit. Another tab with the title ‘Manage Locations‘ allows you to manage menu locations in bulk.

How To Hide Dashboard Menu Items From Subsite Admins In WordPress?

Do you want to hide some specific admin menu items from subsite administrators on your WordPress multisite network? Superadmins can selectively hide side admin menus and their sub-menus from the admins of other websites on a multisite network or from other users on the website.

How To Hide WordPress Menus & Top-Bar Items?

For a basic single-site WordPress installation, you may use the Hide Admin Menu plugin. Simply install and activate it, after activation visit the ‘Hide Menu’ item on your dashboard.

Here it offers you checkbox options to show or hide the side admin menu as well as the top-bar items.  You simply need to select your options and click the ‘Update’ button.

Admin also can hide menu according to the role of users.

How To Hide WordPress Menus Network Wide?

Another plugin called User Role Editor works both for single and multisite WordPress installations. Simply install and network activate it. Upon activation, navigate to Settings -> User Role Editor on your network admin dashboard.

Select the ‘Administrator’ role, remove the capabilities that you want to remove, tick the “Apply to All Sites” option (so that it applies to all the sites on the network), and save your new settings.

Now check the backend of any of your subsites and you will notice that the selected menu is no more there. Similarly, you can hide other menu pages as well. 

How To Check The Health & Security Issues On Your WordPress Site?

WordPress provides you with a tool that is essential for maintaining your website’s health. On your dashboard, the Tools -> Site Health section provides an overview of your site’s performance and security status. It helps ensure that your site runs optimally by checking for issues like outdated software, missing security features, or misconfigurations.

  1. Status: Lists critical and recommended improvements.
  2. Info: Provides detailed server and site information such as PHP version, themes, and plugins.
  3. Debugging: Helps identify potential problems.
  4. Performance: Suggests ways to improve loading speed.
  5. Security: Highlights areas to enhance security such as HTTPS, file permissions, etc.

The page shows information about your WordPress configuration and items that may need your attention. On the top it shows critical issues that may have a high impact on the performance or security of your site, resolving these issues should be prioritized.

It also recommends some improvements, these are basically the tasks that are considered beneficial to your site, although not as important to prioritize as a critical issue, they may include improvements to things such as the performance and user experience of your website.

How To Quickly Start A Website On Your Domain Name?

Here are the simple steps to register a domain name, subscribe to cPanel hosting, install WordPress, and manage your site on Sangkrit.net:

  1. Register Domain: Visit Sangkrit.net, search for your desired domain name, and complete the purchase.
  2. Subscribe to cPanel Hosting: Subscribe to a cPanel hosting plan during domain registration when the system prompts you to add hosting.
  3. Access Your Hosting: Navigate to your account’s ‘My Products’ section and click ‘Setup’ next to your hosting to enter your domain name. Next, click ‘Manage’ to access your hosting’s cPanel.
  4. Install WordPress via Installatron: On cPanel, navigate to Installatron, select WordPress, and install it.
  5. Manage Website from WordPress Admin: After WordPress installation, click the admin URL to access the admin dashboard and manage your website content.

You can access your WordPress dashboard by visiting yourdomain.com/wp-admin, and logging in with the credentials you created during installation. From the WordPress admin area, you can customize your site, install themes, add plugins, and create content.

How To Auto Redirect Old Permalinks To New Ones In WordPress?

Changing WordPress default permalinks to a “Post Name” structure is crucial for better SEO, user experience, and readability. Default URLs in WordPress are often unattractive and not informative (e.g., ?p=123). By switching to post name permalinks, the URLs become more meaningful and descriptive (e.g., example.com/sample-post), which helps search engines understand the content better, leading to improved rankings.

Additionally, this format is more user-friendly, making it easier for visitors to remember and share, enhancing your site’s visibility and accessibility. But the problem occurs when you switch to a new permalink structure (Dashboard -> Settings -> Permalinks), your old links archived by search engines or shared on social media become a broken link to your website.

In this lesson, you will learn about auto-redirecting old permalinks to new ones. You can simply change your default WordPress permalinks, switch to SEO-friendly post-name permalinks, and then automatically redirect old permalinks to new ones in one click with the help of a plugin.

WP Permalink Redirect is a WordPress plugin that automatically process permalink redirection on your website. All you have to do is install-activate it and that’s all. The plugin has no configuration page, it immediately starts to work upon activation.

Upon activation, the plugin also removes duplicated content issues and redirects your visitors to the new permalink using a 301 i.e. permanently redirect status code. You can even confirm its working with Google webmaster tools. It also takes good care of website pagination of taxonomies like categories and blog lists to allow them to work normally on your WordPress site.

How To Remove The Tag Base From WordPress Permalinks?

You can remove the base tag slug in the WordPress permalinks structure. Earlier this was done with the help of a plugin or PHP function but now you can do it from your admin area dashboard.

By default the tag URL on WordPress looks something like this – yourdomain.com/tag/tag-name, now we have to remove the tag from the permalink so that URLs should look something like this yourdomain.com/tag-name/.

These steps allow you to remove the tag prefix completely by modifying your site’s permanent link settings.

  1. Navigate to your WordPress dashboard
  2. Navigate to Settings -> Permalinks page
  3. Scroll to Custom Structure and put ‘/%tag%/%postname%/’.
  4. Go to Tag Base and type in a dot “. “
  5. Save your changes.

The tag prefix is removed by typing the dot in the tag base field. It completely removes the mandatory tag base from the tag permalinks, so the tag name comes right after your domain name in the permalink structure.

By default, this field is left blank which represents the default prefix.

How To Remove The Category Base From WordPress Permalinks?

You can remove the base category slug in the WordPress permalinks structure. Earlier this was done with the help of a plugin or PHP function but now you can do it from your admin area dashboard.

By default the category URL on WordPress looks something like this – yourdomain.com/category/category-name, now we have to remove the category from the permalink so that URLs should look something like this yourdomain.com/category-name/.

These steps allow you to remove the category prefix completely by modifying your site’s permanent link settings.

  1. Navigate to your WordPress dashboard
  2. Navigate to Settings -> Permalinks page
  3. Scroll to Custom Structure and put ‘/%category%/%postname%/’.
  4. Go to Category Base and type in a dot “. “
  5. Save your changes.

The category prefix is removed by typing the dot in the category base field. It completely removes the mandatory category base from the category permalinks, so the category name comes right after your domain name in the permalink structure.

By default, this field is left blank which represents the default prefix.

Alternatively, you may add the following rule in .htaccess file present in the root directory of your website :

RewriteRule ^category/(.+)$ https://www.yoursite.com/$1 [R=301,L]

This also removed the category base, don’t forget to replace yoursite.com with your domain. The same can be done with the help of the Yoast SEO plugin. If you are using it on your website simply navigate to Yoast SEO -> Search Appearance and open the ‘Taxonomies’ tab.

Scroll to the Category URLs, select ‘Remove the categories prefix’, and save the changes.

How To Display Outdated Content Alerts With Old Post Notice In WordPress?

The Old Post Notice plugin is a valuable tool for WordPress users managing blogs with large archives. It helps notify visitors when viewing older posts that might contain outdated information. This feature can significantly enhance the user experience, ensuring readers are aware that the content they’re consuming may no longer be current, which is especially important for tech, news, or product blogs that update frequently.

The plugin offers several features that provide flexibility and control over how notices appear on older posts:

  1. Customizable Notices: You can set your own notice text to inform users about a post’s potential outdatedness. This customization includes options for color schemes (background and text) and where the notice appears—above or below the content.
  2. Post Age Settings: You decide how many days old a post should be before the notice is triggered. This allows you to target only significantly older posts while keeping recent articles clear of notices.
  3. Published vs. Modified Date: The plugin lets you choose whether the notice is based on the post’s original publish date or the last modified date. This is useful if you frequently update older posts with fresh information.
  4. Built-in and Custom Styling: It includes a default styling option, but advanced users can disable it to apply their custom CSS.
  5. Control Over Activation: You can easily enable or disable the notice without losing your settings.

How to Use Old Post Notice Plugin?

Once you install and activate the Old Post Notice plugin, follow the given steps of configuration:

Step-1 Navigate to Settings -> Old Post Notice in your WordPress dashboard.

Step-2 Enable the notice by ticking the option. You may customize the notice text, choose the number of days to trigger the notice, and decide whether it’s based on the post’s published or modified date.

Step-3 Adjust the styling options, such as the background and text colors, or apply custom CSS if desired. Then save your changes.

    The notice will automatically display on all posts that meet the given age criteria.

    The plugin lets you keep your blog relevant and transparent, ensuring that your readers are informed about older content. This adds credibility to your site and helps manage user expectations.

    How To Set External Links To Open In A New Tab In WordPress?

    It is easy to link a word and set its target to blank so that it opens in a new tab. Most website owners want to make all external links open in a new window and all internal links open in the same tab, you can make this thing easy and automatic with the help of a plugin.

    Simply install and activate Open external links in a new window on your WordPress site. Once the plugin is activated, navigate to your admin area dashboard Settings -> External Links page.

    By default, the plugin makes all external links open in a new tab but on its settings page, you can type URLs that should either be forced to open in a new window or ignored. Some of the basic features of this plugin include:

    1. It opens up all (or specific) external links in a new window
    2. It produces XHTML Strict compliant and is search engine optimized (SEO)
    3. It can can open external links starting with http:// or https:// in a separate browser window or tab
    4. It handles the links client-side, which lets search engines follow the links properly
    5. It becomes inactive when a browser does not support JavaScript, and hence doesn’t result any errors

    If you need more advanced features, there is another free plugin called WP External Links. This plugin lets you manage all external and internal links on your website by enabling you to control icons, nofollow, no opener, UGC (User Generated Content), sponsored, and yes if links open in a new window or new tab.

    How To Make All Links (Internal & External) Open In New Tab In WordPress?

    You can set all links (internal and external) on your WordPress website to open in a new tab.

    By default all WordPress links open in the same tab, although there is an option in the links box to set specific links to open in a new tab, you can do that while adding a new link in your post or page content. But to make all the links open in a new browser tab, you simply need to add a few lines of JavaScript code to your website which can be done by activating the following plugin.

    The WordPress plugin Open Links In New Tab automatically sets links to open in a new tab. You simply need to install and activate it on your website and that’s all. The plugin provides you an option if you want to set only external links to open in a new tab, or just internal links in a new tab, or both.

    This plugin works by adding a few JavaScript code lines on your website, it doesn’t depend on any external library and doesn’t even require jQuery, which is the most common JavaScript library.

    How To Open WordPress Navigation Menu Links In A New Tab?

    The navigation menu links are the links you display in your website’s menu bar. Managing WordPress menus is easy, its default interface allows you to add menu items from various filters of your website, rearrange them with drag and drop interface, and set their navigation label and title attribute.

    However, some advanced options can be enabled from the ‘Screen Options’ tab present in the top right corner of the menu admin screen. In this lesson, you will see how to make some menu links to open in a new tab.

    Visit your WordPress admin area dashboard and navigate to Appearance -> Menus page. Now click the ‘Screen Options‘ tab and tick ‘Link Target‘ option visible in the ‘Show advanced menu properties’ section.

    This adds a new checkbox ‘ Open link in a new window/tab‘ option on each menu link added to your menu structure. Now all you need to do is tick that option on links that you want to open in a new tab.

    Click Save Menu to apply the updates. This will ensure the selected menu links open in a new tab.

    How To Open Navigation Menu Links In New Tab (Using Block Editor)?

    To open navigation menu links in a new tab in block themes in WordPress, follow these steps:

    1. Navigate to Appearance -> Themes to use the full site editor.
    2. Click on the header section, then select the Navigation Block where the menu is located.
    3. Use the ‘+’ icon to add a link or edit an existing one.
    4. Toggle the option for ‘Open in new tab’ to ON.
    5. Save your changes by clicking the ‘Submit‘ button and then ‘Save’ button at the top.

    You can also open all external links on your website automatically in a new tab or window with the help of a plugin. You will learn about it in the next lesson.

    How To Find & Remove Broken Links In WordPress?

    Broken Link Checker is a popular WordPress plugin that lets you identify and fix broken links on your website. A broken link, also known as a dead link, can negatively impact both user experience and SEO rankings. This plugin scans your website content—posts, pages, comments, etc to detect any non-working URLs, images, or embedded media like YouTube videos that may have been removed or relocated.

    To start removing broken links using the Broken Link Checker plugin on your WordPress site, simply follow these steps:

    1. Install & Activate the Plugin: Install Broken Link Checker from the Plugins -> Add New page and activate it.
    2. Scan for Broken Links: The plugin will automatically begin scanning your site for broken links. You can monitor the scan in your WordPress dashboard under the Link Checker page.
    3. Fix or Remove Links: Once broken links are detected, go to the Broken Links page. You can either: Update the broken link, remove it, or dismiss that it’s not an issue.
    4. Bulk Actions: The plugin allows you to fix multiple links at once using bulk actions for faster management.

    By following these steps, you can keep your WordPress site free from broken links, ensuring a better user experience and preserving SEO rankings.

    The plugin does real-time monitoring and also sends you email as it finds any dead links on your website. You can fix or remove the link from the plugin’s interface.

    How To Add Product Videos In WordPress WooCommerce Website?

    You can add videos to describe or promote your products at your WordPress eCommerce store. This enhances the shopping experience and helps showcase product features effectively.

    Woocommerce allows anyone to build an online shop without technical skills. All you have to do is register your domain name, subscribe WordPress, and install the WooCommerce plugin. Then you can manage your website from its admin interface.

    This lesson will guide you on adding single or multiple videos on any product to its linked featured image or product gallery.

    WPC Product Videos for WooCommerce

    To start you will need to install-activate a WordPress plugin called WPC Product Videos for WooCommerce. Upon activation, open the product you want the video to be added or you can do this while adding a new product.

    The product admin page will show you a newly added field for the video URL, this is next below the featured image section. Simply paste your video URL there and update or publish your product. It boosts product presentation and can improve conversions.

    The plugin works for YouTube and Vimeo videos. Alternatively, you can upload your video from your WordPress Media Library and use then its URL.

    Product Video Gallery for WooCommerce

    Product Video Gallery for WooCommerce is another plugin that allows you to enhance product pages by adding videos to the product gallery. It supports various video formats like YouTube, Vimeo, or self-hosted videos, making it easy for you to display your product through engaging visuals.

    Simply install and activate it on your website and then navigate to Products -> WC Product Video, now tick the checkbox to configure a setting, and then save your changes. The plugin usage is quite simple, to add a video to your product: open the edit product page and insert your product YouTube video URL in {Product Video Url} field. That’s it.

    This plugin lets users upload multiple videos alongside product images, creating a dynamic gallery. It also integrates smoothly with WooCommerce themes, providing a more interactive shopping experience for customers.

    How To Clean Unnecessary Tables From MySQL Database?

    Cleaning unnecessary database tables means deleting tables that were created before by some plugin and now are not in use on your website. Removing such tables lightens up your MySQL database. In this lesson, you will learn about cleaning up a database manually and with plugins’ help.

    Before making any changes, always ensure and be careful when deleting database tables, as removing the wrong ones can break your WordPress site. Always keep a full WordPress database backup.

    Step-1, access your hosting’s cPanel and locate the phpMyAdmin option under the Databases section. Click on it to access the database management interface.

    Step-2 In phpMyAdmin, find your WordPress database on the left-hand side panel. Click on the name of the database to view the tables it contains.

    Step-3 Now identify unnecessary tables. Unnecessary tables might come from uninstalled plugins or themes. Tables that don’t seem to match the standard WordPress table names like wp_posts, wp_users, or wp_options may be safe to delete. Some tables have a prefix based on the name of a plugin (e.g., wp_woocommerce_* for WooCommerce).

    Step-4 Once you identify the tables you no longer need, select them by checking the box next to each table. Then, scroll down and choose Drop from the options in the dropdown menu. Confirm the deletion.

    Automatically Identify & Clean MySQL Database Tables

    Alternatively, You can clean your database with a plugin. Plugins such as WP-Optimize or Advanced Database Cleaner let you automatically identify and clean up unnecessary tables without manually going into phpMyAdmin.

    These WordPress plugins provide you with an easy way to clean up unnecessary database tables from your WordPress site.

    What Are the Standard WordPress Database Tables? A Breakdown Of Core WP Tables

    A standard WordPress installation creates a set of database tables that store various types of data, such as posts, users, comments, and settings. Apart from this plugins create their tables and some themes may also do that, but deactivating such plugins and themes leaves their tables on your website clattering your database.

    In this lesson, you will learn about the main 12 standard WordPress database tables so that whenever you like to clean up your database you don’t disturb the core tables that are the life-line of your WordPress site.

    1. wp_posts – Stores all content types like posts, pages, revisions, and custom post types.
    2. wp_postmeta – Contains metadata (custom fields) for posts, such as additional information like SEO settings or image data.
    3. wp_users – Holds information about all registered users, including username, password, email, and user roles.
    4. wp_usermeta – Stores additional metadata about users, such as permissions, preferences, and profile information.
    5. wp_options – Contains various site-wide settings such as the site URL, admin email, time zone, and installed plugins.
    6. wp_terms – Stores the categories, tags, or any custom taxonomies used to classify content.
    7. wp_term_taxonomy – Describes the taxonomy (e.g., category, tag) for each term from the wp_terms table.
    8. wp_term_relationships – Links posts, pages, or custom post types to their respective terms (categories, tags).
    9. wp_comments – Stores comments on posts and pages, including comment content, user details, and approval status.
    10. wp_commentmeta – Contains metadata about comments, such as IP addresses, ratings, or spam status.
    11. wp_links – Used to manage the blogroll feature, which is now deprecated but still exists in older versions.
    12. wp_actionscheduler_actions (optional in newer WordPress versions) This is used to store scheduled actions or cron jobs, commonly created by WooCommerce and other plugins.

    Each table uses a default prefix of wp_.

    While installing WordPress manually on your hosting account, a step asks you to enter the database name, database username, database user password, and host and the last field asks for the table prefix which by default is wp_.

    This wp_ is the table prefix. this can be changed during installation to enhance security (e.g., mywebsite_) and it also lets you host multiple websites on a single database.

    To change the table prefix while installing WordPress using Installatron, in the “Advanced Settings” section, you’ll find an option for “Table Prefix.” By default, the table prefix is set to wp_, but you can modify this to a unique prefix, such as mywebsite_ or any combination of letters and numbers for added security.

    After entering your desired prefix, continue with the installation process as usual. This change helps secure your site by preventing common SQL injection attacks that target the default table prefix.

    How To Run Multiple Websites In One Database?

    Some low-cost hosting options offer you one or a limited amount of MySQL databases. But do you know that you can run multiple websites in one database, and all websites will work independently without affecting the content and logins of other websites running on the same database.

    You can also install different CMS or applications on the same database. For instance, WordPress and MediaWiki can run on a single database without affecting each other.

    Running multiple websites in a single database is possible by using table prefixes or customizing your database structure. Here’s how you can set it up, especially if you are using a CMS like WordPress.

    While installing WordPress manually on your hosting account, a step asks you to enter the database name, database username, database user password, and host and the last field asks for the table prefix which by default is wp_. This wp_ is the table prefix.

    So all you have to do instead of using wp_ you have to use a different table prefix for every new website on your database.

    For example,

    When you install a CMS like WordPress, you can specify a table prefix during installation. If you want to run multiple websites in one database, use different table prefixes for each website. For example:

    • Website 1: wp1_
    • Website 2: wp2_

    This way, the tables for each website will be separated within the same database.

    For easy remembrance you can use wp1_ , wp2_, wp3_, wp4_ and so on. Not only WordPress but you can install any CMS by using a different unique for each website you install on your database.

    For non-CMS-based websites, you can manually create separate tables for each website within the same database.

    For example, you can create tables for:

    • website1_users
    • website2_users
    • website1_posts
    • website2_posts

    Alternatively, installing a WordPress multisite network is an advanced way of making multiple WordPress sites on the same database. Its main advantage is that you don’t have to install WordPress separately for every new website you create.

    Simply add the following line to your wp-config.php file:

    define( ‘WP_ALLOW_MULTISITE’, true );

    Now log in to your WordPress dashboard and navigate to Tools -> Network Setup to configure it.

    By implementing these methods, you can efficiently run multiple websites in one database without needing separate databases for each.

    Improve Website Speed & Performance With Leverage Browser Caching

    Leverage Browser Caching is a factor responsible for the browsing speed of your website. Fetching resources over the network can be slow and expensive as some downloads need multiple roundtrips between the client (where the website is requested) and the server i.e. where the website is being hosted. This delays the processing, may block the rendering of webpage content, and sometimes also incurs data costs for the visitor.

    Specifying a server caching policy helps the client determine when it can use the previously fetched response. Google Page Insights also uses this in counting the performance of your website.

    So, Leverage Browser Caching is a website performance optimization technique that involves specifying how long web browsers should store certain resources, such as images, CSS files, JavaScript, and other static assets, locally on the user’s device. By doing so, the browser can reuse these resources for future visits to the site, rather than downloading them again from the server.

    This type of browser catching can be activated either by using some plugin like Leverage Browser Caching or by manually setting up an expiry date or maximum age for static resources such as images etc in the HTTP headers which can be done with the following code:

    ## EXPIRES CACHING ##

    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 month”
    ExpiresByType application/pdf “access 1 month”
    ExpiresByType text/x-javascript “access 1 month”
    ExpiresByType application/x-shockwave-flash “access 1 month”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 2 days”

    ## EXPIRES CACHING ##

    Simply open your .htaccess file located in your website’s root directory and paste the given code.

    Key Aspects:

    • Caching Duration: The website owner or developer sets a cache expiration time (e.g., days, weeks, or months) for specific resources through HTTP headers.
    • Reduced Load Time: Once cached, resources are loaded from the user’s local storage, significantly reducing page load times during repeat visits.
    • Lower Server Load: Since resources don’t need to be downloaded repeatedly, server requests are minimized, improving server performance and reducing bandwidth usage.

    WordPress Plugin for Leverage Browser Caching

    Leverage Browser Caching plugin fixes the leverage browser caching issues on your website improving the page speed score on website testing tools like Pingdom, GTmetrix, PageSpeed, Google PageSpeed Insights, YSlow, etc.

    Simply find, install, and activate this plugin from Plugins -> Add New page on your website’s admin area dashboard. It does not have any option. It will start working as soon as you activate it.

    The plugin works for the Apache server simply by adding browser caching code inside the htaccess file. To remove the code you just need to deactivate the plugin.

    How Leverage Browser Caching Works?

    When a visitor first accesses a website, the browser downloads the necessary resources. With browser caching enabled, these resources are stored locally and remain available for a set period, so they don’t need to be downloaded again unless the cache expires or is cleared.

    It improves user experience and search engine rankings by speeding up website performance.

    How To Launch Your Website On WordPress Hosting?

    WordPress hosting refers to web hosting specifically optimized to run WordPress websites. It provides a platform that enhances the performance, security, and easy use of WordPress sites.

    The hosting typically includes specialized features such as pre-configured WordPress installation, automatic updates, and security enhancements, ensuring that WordPress sites run efficiently without the need for manual maintenance.

    To create a website on Sangkrit.net’s Managed WordPress Hosting, follow these steps:

    1. Purchase a Managed WordPress Hosting Plan: First, log in to your Sangkrit.net account. Navigate to the “Hosting” section and select a WordPress plan that meets your needs. Complete the purchase process.
    2. Set Up Your WordPress Website: After purchasing the hosting plan, go to your Sangkrit.net dashboard. Select “WordPress” under the hosting section and click “Setup.” Choose whether to create a new website or migrate an existing one.
    3. Choose a Domain: You will be prompted to choose a domain name for your website. You can select one from your Sangkrit.net account or register a new domain.
    4. Install WordPress: Sangkrit.net will automatically install WordPress for you once you choose the domain. This installation process takes only a few moments.
    5. Access Your WordPress Dashboard: After the installation is complete, you can access your WordPress dashboard by clicking the “Manage” button next to your WordPress installation in the Sangkrit.net dashboard. The WordPress dashboard URL will be something like “yourdomain.com/wp-admin.”
    6. Choose a Theme: In your WordPress dashboard, go to Appearance -> Themes and browse or upload a theme that fits your website’s goals.
    7. Install Essential Plugins: The WordPress hosting on Sangkrit.net often comes pre-installed with essential plugins, but you can also add more by going to the “Plugins” section in your WordPress dashboard. Consider adding SEO tools, caching plugins, and security solutions.
    8. Customize Your Website: Customize your website by adding content to pages and posts, adjusting menus, and configuring your theme settings.
    9. Set Up Backups and Security: Sangkrit.net’s WordPress Hosting includes automated backups and robust security features. Review these settings and enable any additional options as necessary.
    10. Launch Your Website: Once you’re satisfied with your website’s design and content, make it live by ensuring your domain is properly connected, and start promoting your website!

    Your site is now live and running on Sangkrit.net’s WordPress Hosting, optimized for speed, security, and ease of use.