sell website making service

How WP-Sweep Saved My Client’s Website by Clearing and Cleaning Out Database Clutter and saved from wp-admin Error

Keeping a WordPress site running smoothly is essential, especially for clients relying on it for business. Recently, I had a client whose site was struggling with slow load times and frequent errors on the wp-admin side. After some troubleshooting, I found that a cluttered database was the main culprit. This was when I turned to the WP-Sweep plugin, and it proved to be an invaluable tool. Here’s a breakdown of how WP-Sweep helped me rescue the site and get it back on track.

Note: I wrote this review after using the plugin, this is not a paid review.

The Problem: Database Clutter Slowing Down the Site

With WordPress, it’s easy for the database to accumulate unnecessary data over time. Old revisions, unapproved comments, spam, transient options, and orphaned data can add up, creating a lot of “junk” that the site has to sift through every time it loads or runs a query. For my client’s site, this clutter had become a significant issue. Not only was the wp-admin area sluggish, but it was also throwing server errors that made the site almost unusable.

Discovering WP-Sweep

After some research and weighing options, I came across the WP-Sweep plugin, known for its effective cleanup abilities. This free plugin, developed by Lester ‘GaMerZ’ Chan, offers a user-friendly way to clear out various types of unwanted data that can slow down WordPress sites. Its simplicity and reliability immediately caught my attention, and I decided to give it a try.

The Solution: How WP-Sweep Optimized the Database

Once I installed and activated WP-Sweep, I was able to quickly access its dashboard. The plugin provided a comprehensive breakdown of all unnecessary items in the database, including:

  • Post Revisions – Older versions of posts that no longer served any purpose.
  • Deleted Comments and Spam – Comments that had been trashed but were still taking up space.
  • Transient Options – Temporary data stored by plugins and themes that weren’t relevant anymore.
  • Orphaned Post Meta and User Meta Data – Data that had become detached from posts or users due to past changes.

Each item could be swept away with a single click, which allowed me to clear out thousands of entries in just a few minutes. WP-Sweep doesn’t rely on direct database queries, so it’s also safe to use—an important factor when working on a client’s live site.

Results: Faster Load Times and No More Errors

After the WP-Sweep cleanup, the results were immediate and impressive. The database was streamlined, and wp-admin responsiveness improved dramatically. My client’s site, which was once plagued by errors and lag, was now running smoothly. WP-Sweep had not only saved me hours of manual database maintenance but also delivered a major performance boost for my client’s site.

Why WP-Sweep is a Must-Have for WordPress Optimization

From my experience, WP-Sweep is an excellent addition to any WordPress toolkit. Here are a few reasons why I recommend it:

  1. Simple to Use – No coding required, just a straightforward interface that anyone can use.
  2. Thorough Cleanup Options – Removes everything from revisions to orphaned data, making it a comprehensive solution.
  3. Safe and Reliable – Uses WordPress’s built-in functions, minimizing the risk of database errors.
  4. Improves Site Performance – By reducing database bloat, it enhances both front-end and back-end speed.

Conclusion: Give WP-Sweep a Try

If you’re experiencing similar issues or just want to keep your site in top shape, WP-Sweep is a powerful, user-friendly option for cleaning up your WordPress database. For me, it was the solution that saved my client’s website from frustrating performance issues. It’s a fantastic tool to help you keep your site running smoothly with minimal effort.

Try WP-Sweep today, and see how a clean database can transform your WordPress experience and save you from unwanted WordPress admin crash!

How to Dynamically Display Different Languages in Visual Composer with Polylang WordPress Plugin

In today’s tutorial, I’ll walk you through the process of dynamically showing different languages on a WordPress website using the Visual Composer plugin, alongside the Polylang translation plugin. This setup will allow your website to display content in various languages based on user selection. Let’s dive into the details.

Introduction to Visual Composer and Polylang

Visual Composer is a drag-and-drop page builder plugin for WordPress, similar to Elementor, that allows you to create visually appealing pages without writing code. However, if you are using Polylang, a plugin designed to translate your website into multiple languages, it might not directly support dynamic text changes inside Visual Composer. But don’t worry; by using some custom code and shortcodes, you can integrate Polylang to work seamlessly with Visual Composer.

The Problem and the Solution

When I was searching for a solution to dynamically change text inside Visual Composer based on the user’s language preference, I realized there wasn’t a direct method available from the Polylang plugin. To overcome this limitation, I created a shortcode that responds when a user switches between languages. This shortcode dynamically displays the appropriate text in the selected language on the page. Below is a screenshot from my website, where we have different languages to select from in the header menu.

How to Dynamically Display Different Languages in Visual Composer with Polylang WordPress Plugin

Step-by-Step Guide

Here’s how you can achieve this functionality:

1. Create a Custom Function

Start by creating a custom function in your functions.php file, which is part of your WordPress theme. This function will allow us to generate dynamic content in multiple languages.

For example, let’s say we want to dynamically display the “About Us” section in different languages. Here’s a sample PHP code that you can copy-paste in your functions.php file:

<?php 

function footer_about_us() {
   
        if(pll_current_language() == 'en') {
                    echo '<div class="footer-footeraboutus">		
		
This is an english line.	jaksd ashdajs dha jshdajs hd 		 		
						</div>';
					
                } else if(pll_current_language() == 'fr') {
                    echo '<div class="footer-footeraboutus">		
		
This is   fr line. sadasdasdajksdh asjdh ajs hdjashd					
							
						</div>'; 
	
                } else if(pll_current_language() == 'de') {
                    echo '<div class="footer-footeraboutus">		
		
This is   de line.		jhsda jashdjahsd jashdaj kshd			
						
						</div>'; 			
			
	
                } 
   
}
add_shortcode('footeraboutus', 'footer_about_us');
// [footeraboutus]
?>

In this code:

  • pll_current_language() is a Polylang function that detects the current language.
  • Based on the current language, it returns the appropriate text (in this case, either English or French).

2. Add a Shortcode

Once you have your custom function, the next step is to register it as a shortcode in WordPress. Shortcodes allow you to insert dynamic content into posts and pages easily.

Now, you can use the shortcode [footeraboutus] anywhere on your website, including Visual Composer elements, and it will display the correct content based on the selected language.

3. Insert Shortcode in Visual Composer

After creating the shortcode, you need to insert it into your Visual Composer page. To do this:

How to Dynamically Display Different Languages in Visual Composer with Polylang WordPress Plugin
  • Go to the page you want to edit using Visual Composer.
  • Click on the element where you want to display the dynamic text.
  • Paste the shortcode [footeraboutus] inside the element.

Once the page is updated, the content in this section will dynamically change based on the language selected by the user.

Final Steps

After setting up the shortcode and inserting it into the page, all that’s left is to test it. When a user selects a different language (for example, English or French) from the Polylang language switcher, the corresponding content will be displayed automatically.

This method allows you to:

  • Dynamically display different languages on your website pages.
  • Easily manage multilingual content using Polylang and shortcodes.

Conclusion

With this approach, you can integrate the Polylang translation plugin with Visual Composer to create a seamless, multilingual WordPress website. The key lies in creating custom functions and shortcodes that respond to language changes dynamically. Whether you’re building an “About Us” section or any other content block, this method will ensure your users get the right content in their preferred language.

If you have any questions, feel free to leave them in the comments below. Don’t forget to like and share this article if you found it helpful!

How To Show All Pages, Products, Tags Links In Sitemap

Google Search Console Not Showing All Pages, Products, and Tags on Sitemap

During a routine check, I found that Google Search Console was not displaying the full list of products and tags in the sitemap. My website contains many pages, products, and tags, and the sitemap in Search Console should show the full list. Therefore, I began investigating and will provide a solution on how you can list all your pages, products, tags, and categories in the sitemap and have them displayed in Search Console.

Search console sitemap showing only few products.

Search console sitemap showing only few products.

Why should I include everything in the sitemap?

If you want your site to follow all the best SEO practices, you should ensure that all the links you want to be searchable by visitors are listed in Google search results. The best way to do this is by automatically listing all links in the sitemap. When search engine bots like Bing and Google crawl your website, they will discover those pages and list them in their search results. If search engine crawlers do not find links in your website’s sitemap, it will be challenging to maintain good on-page SEO, and those missing pages or products may not get listed in Google/Bing search results, causing you to lose traffic.

Why Was the Search Console Sitemap Not Showing All Links from My Website?

It was concerning to see that pages, products, and tags were missing from the sitemap, as shown in the image above. After some analysis, I found that my website’s sitemap, generated by the Rank Math SEO plugin, was not displaying all the links. Therefore, the issue was with my own sitemap, and Google only crawled what was included in it. Initially, I thought it was Google’s fault for not picking up everything listed in the sitemap.

google search console

google search console

My next task was to ensure that the sitemap contained all the links from my WordPress website.

How I Fixed My Website’s Sitemap

To fix the sitemap, I searched the internet but couldn’t find a satisfactory solution. I even tried deactivating and reactivating the SEO plugin, but nothing changed, and I started to worry.

One technique I often use when everything seems correctly set up, but changes aren’t reflected on the site, is to clear all the possible caches. I cleared the cache from my website’s own cache plugin, Cloudways cache, and Ezoic cache.

How To Show All Pages, Products, Tags Links In Sitemap

Ezoic leap cache

W3 Total Cache plugin

W3 Total Cache plugin

After emptying these caches, my sitemap finally displayed the correct number of links. This was a huge relief, as it indicated that everything on my side was fixed. Now, it was up to Google to re-crawl the sitemap and reflect those changes in Search Console.

Re-indexing My Sitemap on Google Search Console

To make the process risk-free, I deleted the sitemap from Search Console and added it again. After a few minutes, Search Console was displaying the correct sitemap.

Conclusion

The problem stemmed from the sitemap running an outdated cache, which didn’t reflect recent changes on the website. Clearing the cache allowed my website to show all the links in the sitemap correctly.

Share this article if it helps.

If you need help regarding any WordPress/website issues, you can contact me

Check Most Recent Posts