How to Fix WooCommerce Checkout Stuck on Loading Spinner

Is your WooCommerce checkout page stuck on the loading spinner, preventing customers from completing their orders? This frustrating issue can lead to lost sales, abandoned carts, and a poor user experience. Fortunately, you can fix it with a few troubleshooting steps.

Let’s break down every possible cause and solution thoroughly so you can get your checkout working smoothly again.


Step 1: Clear Cache and Test Again

Why this matters: Cached data can disrupt dynamic elements like the WooCommerce checkout page, especially if outdated files are being loaded instead of the latest scripts.

What is Cache?

Caching temporarily stores copies of your website files to speed up loading times. However, if the cache becomes outdated, it can block essential scripts from running properly.

How to Clear Cache:

  • Browser Cache: Clear your browser’s cache or try accessing the checkout page in incognito mode to rule out browser-related cache issues.
  • WordPress Cache: If you use plugins like WP Rocket, LiteSpeed Cache, or W3 Total Cache, clear the cache directly from the plugin settings.
  • Server Cache: Some web hosts offer server-level caching (e.g., Kinsta, SiteGround). Clear the cache from your hosting control panel.

Test the Checkout: After clearing all caches, refresh your checkout page and try placing a test order to see if the spinner issue is resolved.


Step 2: Disable Conflict-Causing Plugins

Why this matters: Plugins can interfere with each other, especially if they modify how scripts load on the checkout page.

How Plugin Conflicts Occur:

  • Some plugins modify the checkout page behavior or override default WooCommerce scripts.
  • Security, optimization, or payment gateway plugins can prevent checkout scripts from loading properly.

How to Test for Plugin Conflicts:

  1. Go to Plugins > Installed Plugins.
  2. Deactivate all plugins except WooCommerce.
  3. Test the checkout page to see if the spinner issue resolves.
  4. Reactivate plugins one by one and test after each reactivation.

Common Plugins Known to Cause Checkout Issues:

  • Caching Plugins: WP Rocket, W3 Total Cache
  • Security Plugins: Wordfence, iThemes Security
  • Payment Plugins: Old versions of Stripe, PayPal plugins

Pro Tip: Use the Health Check & Troubleshooting plugin to run conflict tests in a secure troubleshooting mode without affecting your live site.


Step 3: Switch to a Default Theme

Why this matters: Some themes include custom WooCommerce modifications that might conflict with the default checkout scripts.

How to Test with a Default Theme:

  1. Go to Appearance > Themes.
  2. Activate the default Storefront theme or Twenty Twenty-Four.
  3. Refresh your checkout page and see if the spinner issue persists.

What to Do If the Theme Is the Problem:

  • Check for a theme update that might resolve the issue.
  • Contact the theme developer for WooCommerce compatibility fixes.
  • Consider switching to a WooCommerce-optimized theme like Storefront or GeneratePress.

✅ If the default theme works fine, the issue is with your current theme.


Step 4: Enable AJAX Checkout in WooCommerce

Why this matters: WooCommerce uses AJAX for dynamic interactions on the checkout page. If disabled, the loading spinner can get stuck because essential scripts fail to load.

What Is AJAX?

AJAX (Asynchronous JavaScript and XML) allows parts of the page to load data without refreshing the entire page. WooCommerce uses it for:

  • Real-time order validation
  • Dynamic shipping and tax calculations
  • Live payment processing feedback

How to Enable AJAX Checkout:

  1. Go to WooCommerce > Settings > Advanced > Page Setup.
  2. Verify the Cart and Checkout pages are correctly assigned.
  3. Go to WooCommerce > Settings > Products.
  4. Ensure Enable AJAX Add to Cart is checked.

✅ Refresh the checkout page and test if the loading spinner issue is resolved.


Step 5: Verify Payment Gateway Settings

Why this matters: If your payment gateway isn’t configured properly, it can block the checkout process, causing it to get stuck.

Common Payment Gateway Errors:

  • Invalid API Keys: Check that your PayPal, Stripe, or other gateway API keys are accurate.
  • Incomplete Setup: Ensure all necessary fields in the payment gateway settings are filled correctly.
  • Outdated Plugins: An old version of the payment plugin can disrupt the checkout process.

How to Verify Payment Settings:

  1. Go to WooCommerce > Settings > Payments.
  2. Select the active payment gateway you’re using.
  3. Verify the API keys, client IDs, and secret keys.

Pro Tip: Run a test order using Cash on Delivery to see if the payment gateway is causing the issue.


Step 6: Enable Debugging in WooCommerce

Why this matters: Debug mode helps identify checkout errors by logging error messages that might not be visible on the frontend.

How to Enable Debug Mode:

  1. Go to WooCommerce > Settings > Payments.
  2. Select the payment gateway you’re testing.
  3. Enable Debug Mode for the gateway.

How to Access Error Logs:

  • Go to WooCommerce > Status > Logs.
  • Select the most recent log file related to checkout issues.

✅ Look for messages like AJAX failure or payment error to identify the root cause.


Step 7: Update WooCommerce and WordPress Core

Why this matters: Outdated versions of WooCommerce or WordPress can break compatibility with newer plugins and cause checkout issues.

How to Update WooCommerce and WordPress:

  1. Go to Dashboard > Updates.
  2. Check for available updates for WooCommerce, WordPress Core, and your plugins.
  3. Update them one by one.

Backup Your Site: Always create a backup before updating core files and plugins to avoid data loss.


Step 8: Inspect Browser Console for Errors

Why this matters: Browser console errors can reveal JavaScript conflicts causing the checkout spinner to freeze.

How to Check for Errors:

  1. Open your checkout page in Google Chrome.
  2. Press Ctrl + Shift + J (Windows) or Cmd + Option + J (Mac).
  3. Look for errors marked in red under the Console Tab.

Common Errors to Watch For:

  • Uncaught ReferenceError – Missing JavaScript files.
  • Failed to Load Resource – Blocking payment gateway scripts.

✅ If errors appear, they may point to a specific plugin or theme conflict.


Step 9: Restore WooCommerce Checkout Pages

If your checkout page was accidentally deleted or misconfigured, it can lead to checkout failures.

How to Restore Checkout Pages:

  1. Go to WooCommerce > Status > Tools.
  2. Locate the Create Default WooCommerce Pages section.
  3. Click Create Pages to regenerate the default checkout and cart pages.

Important: Ensure the correct pages are assigned under WooCommerce > Settings > Advanced.


Step 10: Hire a WooCommerce Expert for Checkout Troubleshooting

If you’re still struggling with a frozen WooCommerce checkout, professional help can save you time and prevent lost sales. Certified WordPress experts can diagnose and fix advanced checkout issues, ensuring smooth transactions for your customers.

Need Expert Help Fixing Your WooCommerce Checkout?

Hire a certified WooCommerce expert to troubleshoot and fix checkout loading issues, optimize payment gateways, and ensure smooth order processing.

Get a Free Estimate

By following these steps, you should be able to fix the WooCommerce checkout stuck on loading spinner error and get your store back to processing orders smoothly. If the issue persists, seeking professional help can be a worthwhile investment for your business continuity.

How to Disable the Elementor Pro Templates Library Feature

Elementor Pro’s templates library offers pre-designed layouts for faster website building. However, you might want to disable it if you prefer a fully custom design workflow or for performance reasons. Here’s how you can turn off the Elementor Pro templates library step by step.


Step 1: Understand Why You Might Want to Disable the Templates Library

The Elementor Pro templates library can be a powerful tool, but it’s not always necessary for every project. Common reasons to disable it include:

  • Minimalist Design Preferences: If you prefer creating custom layouts from scratch without pre-built templates.
  • Performance Optimization: Reducing plugin features can lower server resource usage.
  • Limiting Access for Clients: Preventing clients from accidentally applying pre-built templates and breaking the site design.
  • Security Considerations: Fewer features mean fewer points of potential vulnerability.

Best Practice: Only disable the templates library if you’re sure you won’t need it in the future.


Step 2: Disable the Elementor Pro Templates Library Using the Settings Panel

Elementor Pro doesn’t offer a direct toggle to disable the templates library, but you can restrict its usage through settings.

How to Restrict Template Access:

  1. Go to your WordPress dashboard.
  2. Navigate to Elementor > Settings.
  3. Under the Advanced tab, look for Template Library settings.
  4. Disable access to remote templates by toggling the relevant setting.

✅ This method works for basic restriction but may not fully disable the feature for all users.


Step 3: Disable the Templates Library Using Custom Code (Recommended)

For a more permanent solution, you can disable the Elementor Pro templates library using a small code snippet.

How to Disable Templates Library with Code:

  1. Go to Appearance > Theme File Editor.
  2. Open your functions.php file (or use a code snippet plugin like Code Snippets).
  3. Add the following code:
add_filter('elementor/editor/show_templates', '__return_false');
  1. Save the changes and refresh your Elementor editor.

✅ This completely removes the Templates Library button from the Elementor editor.


Step 4: Disable Elementor Pro Templates with a Plugin (No Coding)

If you prefer a plugin-based solution instead of editing code manually, you can use a lightweight plugin to restrict access.

Recommended Plugin:

  • Disable Elementor Templates Library (if available in the plugin directory)
  • Code Snippets Plugin (for non-technical users who want to add the code safely)

How to Use the Plugin:

  1. Go to Plugins > Add New.
  2. Search for Code Snippets.
  3. Install and activate the plugin.
  4. Add the code snippet mentioned in Step 3 inside the plugin interface.

✅ Using a plugin keeps the core files untouched and is easier for beginners.


Step 5: Restrict Elementor Templates Library for User Roles

If you’re working with multiple users on your site, you can disable the templates library only for specific roles using custom capabilities.

How to Disable Based on User Role:

  1. Install the User Role Editor plugin.
  2. Go to Users > User Role Editor.
  3. Select the role you want to restrict (e.g., Editor or Author).
  4. Uncheck Access Elementor Templates Library permission.

✅ This method is useful for client sites where you want to limit design changes by non-admin users.


Step 6: Disable Elementor Pro Updates for Templates Library

If you want to disable template updates while keeping Elementor Pro active, you can block remote requests.

How to Block Remote Updates:

  1. Add the following code to your functions.php file:
add_filter('elementor/template_library/sources/remote', '__return_empty_array');
  1. Save the file and refresh your dashboard.

✅ This prevents Elementor Pro from fetching new templates from their cloud service.


Step 7: Test If the Templates Library Is Fully Disabled

After making the changes, you need to verify whether the templates library is indeed disabled.

How to Test:

  • Open any page in the Elementor Editor.
  • Confirm the Templates Library button is no longer visible.
  • Check different user roles to ensure restrictions apply correctly.

✅ If the button is still visible, double-check the code snippets for accuracy.


Step 8: Re-Enable the Elementor Pro Templates Library (If Needed)

If you change your mind and want to bring back the templates library, it’s easy to reverse the changes.

To Re-Enable the Templates Library:

  • If you used code snippets: Remove the code added in the functions.php file.
  • If you used a plugin: Disable the plugin or delete the code snippet entry.
  • For role-based restrictions: Re-enable the Access Elementor Templates Library permission.

✅ Elementor templates can be helpful for rapid design, so only disable them if necessary.


Step 9: Consider Alternative Design Strategies Without Templates

Disabling the templates library means you need a more manual design approach. Here are a few alternatives:

  • Create Your Own Templates: Design your layouts and save them as reusable templates under My Templates in Elementor.
  • Use Theme Builder: Elementor’s Theme Builder can help you create custom page layouts without relying on templates.
  • Use Wireframes: Consider using Elementor Wireframes for a minimalist, template-free design approach.

✅ This way, you maintain full design control without pre-built templates.


Step 10: Hire an Elementor Expert for Custom Configurations

If you’re managing a client site or want to ensure the templates library is disabled without affecting site functionality, hiring a professional can save you time and headaches.

Need Expert Help Disabling Elementor Pro Templates?

Hire a certified Elementor expert to disable templates, optimize your site’s performance, and ensure a clean design workflow without extra bloat.

Get a Free Estimate


FAQs About Disabling Elementor Pro Templates Library

Why Should I Disable the Elementor Pro Templates Library?

Disabling the templates library is useful when:

  • You want complete design control without pre-built elements.
  • To prevent clients from applying templates that break the design.
  • To reduce unnecessary server resource usage.

Can I Disable the Templates Library for Specific Users Only?

Yes, you can disable the library for certain user roles by using the User Role Editor plugin or custom capabilities management in WordPress.


Will Disabling the Templates Library Affect My Current Designs?

No, disabling the library only prevents access to new templates. Existing templates already applied to your pages will remain unaffected.


Is There a Plugin to Disable the Templates Library?

While there isn’t a dedicated plugin for this task, the Code Snippets plugin can be used to safely add the necessary code to disable the feature.


How Do I Re-Enable the Elementor Pro Templates Library?

Simply remove the code snippet you added or re-enable the Access Elementor Templates Library permission for the user roles you previously restricted.


Does Disabling Templates Improve Website Speed?

Yes, disabling unused features can reduce server requests and improve loading times slightly. However, performance gains may be minimal unless combined with broader optimization steps.


Can I Still Use My Custom Templates After Disabling the Library?

Yes! Disabling the templates library only affects Elementor’s pre-built templates, not your saved templates stored under My Templates.


By following these steps, you can effectively disable the Elementor Pro templates library while keeping your design workflow smooth and secure. If you’re unsure or managing multiple sites, hiring a professional can ensure the task is done correctly.

How to Prevent Google from Indexing Specific Posts Using Rank Math SEO?

Preventing Google from indexing specific posts using Rank Math SEO helps you manage what content appears in search results. Whether you’re working with test pages, duplicate content, or private posts, controlling visibility is essential for effective SEO.

Here’s a complete breakdown of how to block posts, categories, media attachments, and more from being indexed using Rank Math SEO.

 

1. How do I prevent Google from indexing a post using Rank Math SEO?

If you want to hide a specific post from search results, Rank Math makes it easy to block posts using the noindex setting.

Steps to Noindex a Single Post:

  1. Log into your WordPress dashboard.
  2. Go to Posts > All Posts.
  3. Select the post you want to block from Google.
  4. Scroll down to the Rank Math SEO box under the content editor.
  5. Click on the Advanced tab.
  6. Set the Robots Meta option to Noindex.
  7. Save the post by clicking Update.

Result: Google will be instructed not to index the post during the next crawl. However, if the post was already indexed, it might take some time before it disappears from search results.


2. Can I block indexing for multiple posts at once in Rank Math?

Yes, Rank Math allows bulk-editing posts for faster management.

Steps to Noindex Multiple Posts:

  1. Go to Posts > All Posts.
  2. Select multiple posts using the checkboxes.
  3. From the Bulk Actions dropdown, choose Edit and click Apply.
  4. The bulk editor will open.
  5. Locate the Rank Math SEO settings and set Robots Meta to Noindex.
  6. Click Update to apply changes.

Why Bulk Noindex? This method is perfect for hiding old, irrelevant, or test content from Google without editing posts individually.


3. What is the difference between “noindex” and “nofollow” in Rank Math?

Noindex and Nofollow are often confused, but they serve different SEO purposes.

  • Noindex: Prevents search engines from showing a post or page in search results. The content can still be crawled, but it won’t appear in search listings.
  • Nofollow: Tells search engines not to follow links on the page. This prevents the transfer of link equity (SEO value) to linked pages.

Use Noindex When:

  • You want to hide a page entirely from search results (like a thank-you page).

Use Nofollow When:

  • Linking to untrusted websites where you don’t want to pass link authority.

4. Will blocking a post from indexing remove it from Google immediately?

No, simply marking a post as noindex won’t instantly remove it from search results. Google needs to re-crawl the page to register the change.

How to Speed Up the Removal Process:

  1. Go to Google Search Console.
  2. Click URL Removals.
  3. Enter the URL of the page you want removed.
  4. Request manual removal.

Important:

  • If the page was already indexed, it can take several weeks to be removed completely.
  • You can speed this up further by resubmitting your sitemap using Rank Math’s Sitemap settings.

5. Can I prevent indexing for custom post types using Rank Math?

Yes, Rank Math allows you to block custom post types such as products, testimonials, or portfolio items.

Steps to Noindex Custom Post Types:

  1. Go to Rank Math > Titles & Meta.
  2. Select the Custom Post Types tab.
  3. Find the post type you want to block (e.g., Portfolio).
  4. Set the Robots Meta setting to Noindex.
  5. Save the changes.

Example Use Case: If you’re running an e-commerce site and want to block outdated products or hidden listings, this is a perfect use case for noindexing custom post types.


6. Is it possible to block categories and tags from being indexed in Rank Math?

Yes, Rank Math provides an easy way to block both categories and tags from appearing in search results.

Steps to Noindex Categories & Tags:

  1. Go to Rank Math > Titles & Meta.
  2. Click on Categories and select Noindex.
  3. Repeat the same for Tags.

Why Block Categories and Tags?

  • If they have thin content (like a single post in a category).
  • To avoid duplicate content issues.
  • If you don’t want archive pages visible in search results.

7. How do I verify if a post is successfully noindexed in Rank Math?

You can check if a page is noindexed in two ways:

Method 1: Check the Page Source Code

  1. Open the post in your browser.
  2. Right-click and select View Page Source.
  3. Search for this meta tag:
    <meta name="robots" content="noindex">
    

✅ If present, the page is successfully noindexed.

Method 2: Using Google Search Console

  1. Go to URL Inspection Tool in Search Console.
  2. Enter the page URL.
  3. Google will show if the page is blocked or indexed.

8. Can I block media attachments from being indexed?

Yes, media attachments often generate thin content and can clutter search results.

Steps to Noindex Media Attachments:

  1. Go to Rank Math > Titles & Meta.
  2. Click the Media tab.
  3. Enable Noindex Media Attachments.
  4. Save the settings.

Why Block Media Attachments?

  • Each image or file upload can create a separate URL, which dilutes SEO value.
  • It prevents orphaned pages from being indexed unnecessarily.

9. Does using noindex affect my site’s overall SEO?

No, using noindex strategically improves your site’s SEO health.

Benefits of Using Noindex Properly:

  • Prevents low-value content from being indexed.
  • Reduces duplicate content issues.
  • Helps focus Google on important, high-quality content.

Key Mistake to Avoid:

  • Do not noindex high-quality posts or cornerstone content. Only use it for pages like test posts, outdated content, and duplicate pages.

10. How do I revert a noindex setting if I change my mind?

If you noindexed a post and want it back in search results:

Steps to Remove Noindex:

  1. Open the post in WordPress.
  2. Go to the Rank Math SEO Box > Advanced Tab.
  3. Change Noindex back to Index.
  4. Click Update.

Pro Tip: After changing the setting, go to Google Search Console and request a URL re-crawl to speed up the reindexing process.


Summary Table:

ActionSteps
Block a Single PostEdit Post > Rank Math SEO Box > Noindex > Save
Bulk Noindex Multiple PostsBulk Edit > Rank Math SEO > Noindex > Save
Noindex Custom Post TypesTitles & Meta > Custom Post Types > Noindex
Block Media AttachmentsTitles & Meta > Media > Noindex
Verify NoindexView Page Source > Search <meta name="robots" content="noindex">

Need Help with Rank Math SEO or WordPress Optimization?

Hire a certified WordPress expert from Codeable to fix indexing issues, optimize your SEO settings, and ensure your website ranks higher on Google.

Get a Free Estimate

How to Add Custom User Roles in WordPress

Adding custom user roles in WordPress lets you control access to specific parts of your website, making it easier to manage large teams, multi-author blogs, or membership sites. Whether you’re running an online store, a learning platform, or a content-heavy site, defining roles with tailored permissions ensures better security and workflow management.

You don’t need to be a developer to add custom roles. Here’s how to create and manage them using both plugins and manual code methods.


Why Create Custom User Roles in WordPress?

WordPress comes with six default roles:

  • Administrator: Full control over the entire website.
  • Editor: Manage and publish content but no access to settings.
  • Author: Publish their own posts only.
  • Contributor: Write posts but cannot publish.
  • Subscriber: Read-only access.
  • Super Admin: Only available in WordPress Multisite installations.

These roles work for basic setups, but as your site grows, you may need custom roles for better control. For example:

  • Content Manager: Can publish and manage posts but not install plugins.
  • SEO Specialist: Access to SEO settings without content editing rights.
  • Support Staff: View user tickets without backend access.

Custom roles help to keep your site secure and organized.


Method 1: Adding Custom User Roles Using a Plugin (Recommended)

The easiest way to create and manage custom user roles is through a plugin. One of the most popular is User Role Editor.

Steps to Add a Custom Role Using User Role Editor:

  1. Install the Plugin:
    • Go to Plugins > Add New.
    • Search for User Role Editor.
    • Click Install Now and Activate.
  2. Create a New Role:
    • Go to Users > User Role Editor.
    • Click Add Role.
    • Provide a role name (e.g., “Content Manager”).
    • Choose an existing role to copy capabilities from (optional).
    • Click Add Role.
  3. Assign Capabilities:
    • Select the new role.
    • Enable or disable permissions by checking the boxes.
    • Click Update to save.
  4. Assign the New Role to a User:
    • Go to Users > All Users.
    • Edit a user profile.
    • Select the new role from the Role dropdown.
    • Click Update User.

Pros of Using a Plugin:

  • No coding knowledge needed.
  • Visual interface for easy management.
  • Reversible changes without coding risks.

Method 2: Adding Custom User Roles Manually with Code

If you prefer working directly with code or want a lightweight setup without plugins, you can create custom roles by adding code to your theme’s functions.php file or a custom plugin.

Example Code to Create a Custom Role:

function add_custom_user_role() {
    add_role('content_manager', 'Content Manager', [
        'read' => true,
        'edit_posts' => true,
        'delete_posts' => true,
        'publish_posts' => true,
        'upload_files' => true,
        'manage_categories' => true
    ]);
}
add_action('init', 'add_custom_user_role');

Key Capabilities Explained:

CapabilityPermission Granted
readBasic site access (viewing posts).
edit_postsEdit existing posts.
delete_postsDelete posts.
publish_postsPublish new posts.
upload_filesUpload media files.
manage_categoriesManage post categories and tags.
edit_theme_optionsEdit theme settings (for admins).

Remove a Custom Role:

function remove_custom_user_role() {
    remove_role('content_manager');
}
add_action('init', 'remove_custom_user_role');

Modify an Existing Role:

function modify_editor_role() {
    $editor = get_role('editor');
    $editor->add_cap('edit_theme_options');
}
add_action('init', 'modify_editor_role');

Method 3: Using Code Snippets Plugin (Best for Beginners)

If you want to avoid touching your functions.php file but still need a code-based solution, the Code Snippets plugin is perfect.

Steps to Use Code Snippets Plugin:

  1. Install Code Snippets Plugin:
    • Go to Plugins > Add New.
    • Search for Code Snippets.
    • Install and Activate.
  2. Add New Snippet:
    • Go to Snippets > Add New.
    • Paste the code from the example above.
    • Save and activate the snippet.

Need Help Adding Custom Roles to Your WordPress Site?

Hire a certified WordPress expert from Codeable to set up custom roles, fine-tune permissions, and ensure your site runs smoothly.

Get a Free Estimate

FAQs About Adding Custom User Roles in WordPress

1. Can I create a custom user role without a plugin?

Yes, by adding code directly to your functions.php file or using the Code Snippets plugin. This method provides full control over user permissions but requires basic coding knowledge.

2. What’s the difference between a role and a capability?

A role is a collection of capabilities. Capabilities define specific actions a user can perform, such as editing posts or installing plugins. A role bundles those capabilities together for easier management.

3. Will my custom roles disappear if I change themes?

If the code is added in the theme’s functions.php file, it will be lost with a theme switch. To avoid this, use a site-specific plugin or the Code Snippets plugin, ensuring roles persist through theme changes.

4. Can I restrict WooCommerce access for a custom role?

Yes, create a role that can manage orders but not access global WordPress settings. This can be done using User Role Editor or by defining capabilities manually with code.

5. Is there a way to bulk assign custom roles?

Yes, the Import Users from CSV with Meta plugin can handle bulk assignments by allowing you to upload a CSV with user data and assign roles based on a dedicated column.

6. Can I create a custom role for editors to manage posts only?

Yes, you can create a restricted editor role using User Role Editor or manually by defining limited capabilities that focus solely on post management.

7. How do I test if my new role is working?

Create a test user, assign the custom role, and log in with the test account to verify its limitations. Ensure the user can only perform the actions specified for that role.


Adding custom user roles in WordPress helps you manage your team and secure your site more effectively. Whether using a plugin like User Role Editor or coding manually, both methods offer great control over user permissions. Stick to the method that suits your experience level and site complexity.

How to Backup a WordPress Site Using cPanel

Backing up your WordPress site is essential for protecting your data and ensuring you’re prepared for unexpected issues like hacks, crashes, or server failures. Losing your data can be devastating, but with cPanel, you can create a full backup quickly and easily. Here’s a step-by-step guide on how to back up your entire WordPress site using cPanel the right way.


Step 1: Log Into Your cPanel Account

The first step is to access your hosting account’s cPanel dashboard, where all the backup tools are located.

How to Access cPanel:

  • Log into your web hosting provider’s account.
  • Locate the cPanel option (often under “My Account” or “Dashboard”).
  • If you can’t find it, refer to your hosting welcome email or contact support for the cPanel link.

Tip: The cPanel URL is often formatted as yourwebsite.com/cpanel or yourwebsite.com:2083.

Once you’re logged in, you’ll be able to access all the necessary tools for creating a backup.


Step 2: Locate the Backup Tool in cPanel

cPanel offers multiple tools for backing up your WordPress site. The Backup Wizard is the most beginner-friendly option.

How to Find the Backup Tool:

  • Scroll down to the Files section in cPanel.
  • You will see two options:
    • Backup Wizard – Recommended for beginners as it provides step-by-step instructions.
    • Backup – A manual backup tool for advanced users.

✅ If you’re new to cPanel, stick with the Backup Wizard for a more straightforward experience.


Step 3: Backup Your WordPress Files

WordPress consists of two critical parts: the site files and the database. Your site files include themes, plugins, media uploads, and core WordPress files. The database stores posts, comments, and settings.

How to Backup WordPress Files Using cPanel:

  1. Click on Backup Wizard and choose Backup.
  2. Select Full Backup for a complete site backup.
  3. Choose the Home Directory as the backup location.
  4. Click Generate Backup.

The system will create a compressed .tar.gz file containing all your WordPress files. This file can be downloaded and stored safely for future restoration if needed.

Best Practice: Always download the file and store it in multiple locations, such as your local computer and a cloud storage service like Google Drive.


Step 4: Backup Your WordPress Database

The database is equally important since it holds all your site’s content, user data, comments, and configurations.

How to Backup the Database Using cPanel:

  1. Go back to Backup Wizard.
  2. Click MySQL Databases under the partial backup section.
  3. Select the database associated with your WordPress site.
  4. Click Download Database Backup.

The database will be downloaded as a .sql file, which you can use to restore your content in case of data loss.

Pro Tip: If you’re unsure which database belongs to your site, check the wp-config.php file for the DB_NAME value.


Step 5: Verify the Backup Files

After completing both the file and database backups, it’s crucial to verify that your backup is complete and functional.

How to Verify Your Backup:

  • File Backup: Confirm the .tar.gz file is not empty and matches your site’s approximate size.
  • Database Backup: Open the .sql file in a text editor and look for tables like wp_posts and wp_users to ensure the data is intact.

Important: Double-check both backups before storing them permanently. Corrupt or incomplete backups won’t help during a site crash.


Step 6: Automate WordPress Backups in cPanel

Manual backups can be effective, but they can also be time-consuming and easy to forget. Automating your backups ensures your site is always protected without manual effort.

How to Automate Backups:

  • Use the JetBackup tool (if available in cPanel).
  • Set up scheduled backups directly in Backup Wizard under the automation settings.
  • Consider premium tools like BackupBuddy or UpdraftPlus for even more automation flexibility.

✅ Set backups to run daily for frequently updated sites and weekly for less active websites.


Step 7: Store Backups Securely in Multiple Locations

A backup is only helpful if it’s stored safely and can be accessed when needed. Keeping multiple copies across different locations is recommended.

Where to Store Your Backups:

  • Local Storage: Keep a copy on your personal computer for immediate access.
  • Cloud Storage: Upload backups to services like Google Drive, Dropbox, or OneDrive.
  • External Drives: Use an external hard drive for additional physical storage security.
  • Offsite Storage: Consider professional offsite backup services for mission-critical websites.

Golden Rule: Follow the 3-2-1 backup strategy:

  • 3 Copies of your backup
  • 2 Stored in different formats
  • 1 Stored offsite

Step 8: How to Restore Your WordPress Backup from cPanel

If your site crashes, you’ll need to restore it from your cPanel backup quickly.

Restoring WordPress Files:

  1. Go to cPanel > File Manager.
  2. Delete the current WordPress files.
  3. Upload the previously downloaded .tar.gz backup file.
  4. Extract the backup archive in the root directory.

Restoring Your Database:

  1. Open phpMyAdmin from your cPanel dashboard.
  2. Select your WordPress database.
  3. Click Import and upload the .sql file.

✅ Once restored, check your site to ensure everything is functioning properly.


Step 9: Perform Regular Backup Maintenance

Maintaining a well-organised backup system ensures you’re always prepared for unexpected issues.

Backup Maintenance Best Practices:

  • Delete Old Backups: Remove outdated backups to free up server space.
  • Label Backups: Use clear labels like “WP-Backup-2025-Jan-01” for better organisation.
  • Test Backups: Periodically test your backup files by restoring them on a staging site.

✅ Consistent maintenance keeps your backup system reliable.


Step 10: Hire a WordPress Backup Expert for Peace of Mind

If managing backups manually feels overwhelming or you run a mission-critical site, hiring a professional can help you automate the entire process and ensure zero downtime.

Need Help Backing Up Your WordPress Site?

Hire a certified WordPress expert to set up automated backups, secure storage, and disaster recovery strategies tailored for your website.

Get a Free Estimate

FAQs About Backing Up WordPress Using cPanel

How Often Should I Back Up My WordPress Site?

It depends on how often your site updates. For busy blogs or eCommerce stores, daily backups are recommended. For smaller sites with fewer updates, weekly backups should suffice.


Can I Restore My Site from a cPanel Backup?

Yes, you can restore both the files and the database through the cPanel Backup Wizard or manually via File Manager and phpMyAdmin.


Where Should I Store WordPress Backups?

For optimal security:

  • Use a mix of local storage (computer, external drive).
  • Store copies in cloud storage (Google Drive, Dropbox).
  • Keep an offsite backup with your hosting provider if available.

Does cPanel Provide Automated Backups?

No, cPanel itself does not provide automated backups by default. Some hosts offer JetBackup integration for scheduled backups, or you can use plugins like UpdraftPlus.


Can I Backup My Site Without a Plugin?

Yes! cPanel lets you manually back up both the database and site files without a plugin. However, plugins offer better automation.


What’s the Difference Between Full and Partial Backups in cPanel?

  • Full Backup: Includes all site files, databases, and settings.
  • Partial Backup: Lets you back up either files or the database individually.

Backing up your WordPress site through cPanel ensures you’re prepared for the unexpected. Protect your hard work by making backups a routine part of your website management!

How to Troubleshoot Database Connection Errors in WordPress

Seeing the Error Establishing a Database Connection message on your WordPress site? This error can take your site offline, but don’t worry—here’s how to troubleshoot and fix it quickly.


Step 1: Check If Your Database Credentials Are Correct

Incorrect database credentials are a common reason for connection errors. WordPress stores this data in the wp-config.php file.

How to Verify:

  1. Access your File Manager via cPanel or an FTP client like FileZilla.
  2. Locate the wp-config.php file in the root directory.
  3. Find the following lines of code:
define('DB_NAME', 'your_database_name');
define('DB_USER', 'your_database_user');
define('DB_PASSWORD', 'your_database_password');
define('DB_HOST', 'localhost');
  1. Verify that:
    • DB_NAME matches the database in your hosting control panel.
    • DB_USER and DB_PASSWORD match your database login details.
    • DB_HOST is typically localhost but may differ for some managed hosts.

✅ If the credentials are wrong, update them and save the file.


Step 2: Check If the Database Server Is Down

The database server could be temporarily down, especially on shared hosting plans.

How to Test:

  • Log into your hosting control panel.
  • Check server uptime or contact support to verify if MySQL is functioning.
  • If you’re using a managed host like Kinsta or SiteGround, their support can confirm this for you.

✅ If the server is down, you may need to wait or contact your hosting provider.


Step 3: Repair Your WordPress Database

Corrupted tables can trigger database connection errors. WordPress has a built-in repair tool to fix this.

How to Repair the Database:

  1. Open your wp-config.php file.
  2. Add the following line at the bottom:
define('WP_ALLOW_REPAIR', true);
  1. Visit: yourwebsite.com/wp-admin/maint/repair.php.
  2. Click Repair Database or Repair and Optimize Database.

✅ After the repair, remove the line from your wp-config.php file for security reasons.


Step 4: Verify Hosting Resource Limits

If you’re exceeding your server’s resource limits, it can cause database errors.

How to Check:

  • Log into cPanel and check the Resource Usage section.
  • Look for CPU, RAM, or I/O Limit Exceeded warnings.

Fix Options:

  • Upgrade to a higher hosting plan if your traffic has grown.
  • Optimize your database (Step 5 below).

Step 5: Optimize Your WordPress Database

A bloated database can slow down your site or trigger connection issues.

How to Optimize:

  1. Install the WP-Optimize plugin.
  2. Go to WP-Optimize > Database.
  3. Select options like:
    • Clean post revisions
    • Remove spam comments
    • Optimize database tables
  4. Run the optimization.

✅ Regular database maintenance keeps your site running smoothly.


Step 6: Check for Corrupted Plugins or Themes

A faulty plugin or theme could be interfering with the database connection.

How to Identify:

  1. Disable Plugins:
    • Access your site via FTP.
    • Rename the /wp-content/plugins/ folder to /plugins-disabled/.
  2. Switch Themes:
    • Rename /wp-content/themes/ to /themes-disabled/.

If the error resolves, reactivate plugins and themes one by one to identify the conflict.


Step 7: Verify File Permissions

Incorrect file permissions can also lead to database errors.

Correct File Permissions:

  • wp-config.php: 440 or 400
  • All other files: 644
  • All folders: 755

How to Fix:

  1. Use an FTP client.
  2. Right-click files and select File Permissions.
  3. Adjust as needed and save.

✅ File permissions should be strict to avoid security vulnerabilities.


Step 8: Check Your WordPress Site URL in the Database

If you’ve recently moved your site or changed domains, the site URL might be incorrect in the database.

How to Verify:

  1. Access phpMyAdmin from your hosting control panel.
  2. Open your WordPress database.
  3. Find the wp_options table.
  4. Look for siteurl and home values.
  5. Ensure both match your current domain.

✅ If they don’t match, update them and test your site.


Step 9: Restore a Backup

If all else fails, restoring a working backup can bring your site back online.

How to Restore:

  • If you use plugins like UpdraftPlus or BackupBuddy, restore from the plugin dashboard.
  • Hosting providers like Kinsta or WP Engine offer one-click restores.

✅ Always keep multiple recent backups to avoid data loss.


Step 10: Contact Your Hosting Provider

If you’re unable to resolve the error yourself, your hosting provider can assist.

Key Information to Provide:

  • The error message you’re seeing.
  • Steps you’ve already tried.
  • Request them to check MySQL server health and error logs.

✅ Reliable hosts often provide database support as part of their service.


Step 11: Hire a WordPress Expert for Database Fixes

Still struggling with database connection errors? Avoid downtime and let a professional handle it for you.

 

Need Expert Help Fixing WordPress Database Errors?

Work with certified WordPress developers to quickly resolve database connection issues, repair corrupted tables, and optimise performance. Save time and avoid downtime!

Get a Free Estimate


FAQs About WordPress Database Connection Errors

What Causes a Database Connection Error in WordPress?

This error happens when WordPress can’t connect to the MySQL database due to:

  • Incorrect database credentials
  • Corrupted database tables
  • Server downtime
  • Plugin conflicts

Can a Plugin Cause a Database Connection Error?

Yes, poorly coded plugins or recent updates can trigger connection errors. To identify the issue, disable all plugins and reactivate them one by one.


How Do I Fix a Database Error After a Migration?

Ensure the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST values in your wp-config.php file match your new hosting environment.


How Can I Prevent Database Connection Errors?

  • Regularly back up your website.
  • Keep plugins and themes updated.
  • Use a reliable hosting provider.
  • Optimize your database monthly.

Is There a Plugin to Fix Database Errors Automatically?

Yes, the WP-Optimize plugin can help clean and repair your database automatically.


What Is the Quickest Way to Fix a Database Error?

Check your wp-config.php file for incorrect credentials and run the WP_ALLOW_REPAIR tool.


Can Changing Hosting Fix Database Errors?

If your server resources are frequently maxed out, switching to a premium host like Kinsta, Cloudways, or WP Engine can prevent future database errors.


Fixing database connection errors can feel overwhelming, but following these steps should help you get your WordPress site back online quickly. If you’re unsure or need faster results, hiring an expert can save you time and prevent further issues.