---
title: Optimizing Database Connections
description: "## **Securing Your Database Credentials** The database is the most valuable target. Always ensure: 1. **Strong Passwords:** Never use simple passwords for your database user accounts. 2. **Remote Access:** By default, remote database access is blocked. If required, only allow…"
url: "https://cyberwaf.com/docs/optimizing-database-connections/"
updated: "2025-12-07"
category: "CMS & Application Integrations"
---

# Optimizing Database Connections

## **Securing Your Database Credentials**

The database is the most valuable target. Always ensure:

1. **Strong Passwords:** Never use simple passwords for your database user accounts.
2. **Remote Access:** By default, remote database access is blocked. If required, only allow access from specific, secure IP addresses (managed in cPanel).

## **Database Optimization and Health**

Slow database queries directly impact your site speed and increase CPU usage.

1. **Clean Up:** Regularly remove unnecessary data, old transients, and spam comments.
2. **Optimization Tool:** Use the built-in **"phpMyAdmin"** tool in cPanel to select your database and run the **"Optimize Table"** command periodically.
3. **Indexing:** Ensure large tables have proper indexes configured to speed up common queries.

## **Database Backups**

Your daily full backups (Article 11) include the entire database. If you need to restore only the database, contact support for a granular restore request.
