Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

To use a managed MySQL-compatible database with WordPress, create the database and an application user, give the WordPress server a secure network path to the database, set the database name, username, password and host in WordPress, then test the connection before switching traffic. The host depends on the setup: it may be a provider endpoint or a local address exposed by a connection proxy. This guide covers two documented patterns—Google Cloud SQL with the Cloud SQL Auth Proxy, and AWS Lightsail WordPress connecting to Aurora in RDS—rather than treating either as a universal recipe.

What “managed SQL with WordPress” means

WordPress runs as an application and stores its content and settings in a MySQL-compatible database. With managed SQL, a cloud provider operates the database service, while WordPress continues to run in a separate application environment. The database is not a replacement for WordPress hosting: the two components still need a working network route, valid database credentials and compatible database software.

WordPress’s cited installation guidance names MySQL 5.7 or MariaDB 10.3 or greater, but requirements can change. Check the live requirements for the WordPress version and database engine you plan to deploy instead of assuming those figures are the current minimum. Also confirm that your hosting environment supports the provider’s connection method and any required client or proxy software.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the connection pattern

Setup Network path Security and operations
Google Cloud SQL with Auth Proxy WordPress connects to a local TCP address or Unix socket; the proxy connects onward to Cloud SQL. Authorize the proxy identity with the Cloud SQL Client role and run the proxy in the application environment. Private IP requires VPC access and the corresponding proxy option.
AWS Lightsail WordPress to Aurora in RDS The documented example uses Lightsail VPC peering, a database in the same AWS Region, and a suitable database security-group rule. Restrict inbound access to the application path and use TLS where applicable. WordPress uses the RDS endpoint and database port.

These are specific documented patterns, not interchangeable configurations. Do not put a Cloud SQL proxy address into an RDS configuration, or use an RDS endpoint as though it were a local proxy. For a different host, container platform or managed database provider, follow that provider’s current networking and connection instructions.

#1 Best Overall
Sale
UGREEN NAS DH2300 2-Bay for Beginners & Personal Users, Phone Backup
  • Entry-level NAS Personal Storage:UGREEN NAS DH2300 is your first and best NAS made easy. It is designed for beginners who want a simple, private way to store videos, photos and personal files, which is intuitive for users moving from cloud storage or external drives and move away from scattered date across devices. This entry-level NAS 2-bay perfect for personal entertainment, photo storage, and easy data backup (doesn't support Docker or virtual machines).
  • Set Your Devices Free, Expand Your Digital World: This unified storage hub supports massive capacity up to 64TB.*Storage drives not included. Stop Deleting, Start Storing. You can store 22 million 3MB images, or 2 million 30MB songs, or 43K 1.5GB movies or 67 million 1MB documents! UGREEN NAS is a better way to free up storage across all your devices such as phones, computers, tablets and also does automatic backups across devices regardless of the operating system—Window, iOS, Android or macOS.
  • The Smarter Long-term Way to Store: Unlike cloud storage with recurring monthly fees, a UGREEN NAS enclosure requires only a one-time purchase for long-term use. For example, you only need to pay $459.98 for a NAS, while for cloud storage, you need to pay $719.88 per year, $2,159.64 for 3 years, $3,599.40 for 5 years. You will save $6,738.82 over 10 years with UGREEN NAS! *NAS cost based on DH2300 + 12TB HDD; cloud cost based on 12TB plan (e.g. $59.99/month).
  • Blazing Speed, Minimal Power: Equipped with a high-performance processor, 1GbE port, and 4GB RAM on Board, this NAS handles multiple tasks with ease. File transfers reach up to 125MB/s—a 1GB file takes only 8 seconds. Don't let slow clouds hold you back; they often need over 100 seconds for the same task. The difference is clear.
  • Let AI Better Organize Your Memories: UGREEN NAS uses AI to tag faces, locations, texts, and objects—so you can effortlessly find any photo by searching for who or what's in it in seconds. It also automatically finds and deletes similar or duplicate photo, backs up live photos and allows you to share them with your friends or family with just one tap. Everything stays effortlessly organized, powered by intelligent tagging and recognition.

Gather the values before editing WordPress

Have the following information ready. Keep the password in your deployment’s secret-management mechanism where possible; do not commit production credentials to a public source repository.

  • Database name: the database WordPress will use.
  • Application username and password: use a dedicated account with only the permissions the application needs, rather than an administrative account.
  • Host and port or socket: an RDS endpoint and port for a direct RDS connection, or the local proxy address/socket for a proxy connection.
  • Network authorization: the firewall, security-group, VPC or IAM permissions needed for the application environment to reach the database.
  • Connection security settings: any TLS or provider-specific options required by the selected route.

A database endpoint being visible in a control panel does not mean the WordPress server can reach it. Verify both the address and the route from the actual runtime where WordPress executes.

Set up the network route

Google Cloud SQL with the Auth Proxy

  1. Enable the Cloud SQL Admin API for the relevant project.
  2. Give the identity that will run the proxy the Cloud SQL Client role, which includes the cloudsql.instances.connect permission.
  3. Run the proxy in the WordPress application environment using credentials authorized for that identity. In its normal configuration it listens locally on a TCP port at 127.0.0.1 or provides a Unix socket.
  4. If the instance is intended to use private IP, run the proxy on a resource with access to the relevant VPC and configure it to use private IP.
  5. Point WordPress to the local endpoint or socket actually exposed by the proxy. Do not expose the proxy listener on an external interface.

The proxy authorizes and encrypts supported connections, avoiding the need for authorized networks or manual SSL setup in those configurations. It still needs valid credentials, permissions and a suitable network path. Google’s local proxy quickstart is a development or test example, not a complete production deployment recipe: production needs a supervised proxy process and workload-appropriate credentials and permissions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AWS Lightsail WordPress to Aurora in RDS

  1. Confirm that the Lightsail WordPress instance is running, VPC peering is enabled, the Aurora database is running, and the database is in the same AWS Region as the Lightsail instance.
  2. Allow the expected application source and database port in the database security group. Keep the rule as narrow as the network design allows; do not open database access broadly merely to make a connection test pass.
  3. Use the RDS endpoint DNS name as the database host and the database instance’s port as the port.
  4. Configure the application for the required TLS connection settings where applicable, then verify that the path works from the WordPress instance.

This sequence applies to the documented Lightsail-to-Aurora example. Other AWS network topologies may need different routing and security-group rules; use the instructions for the specific application and database placement.

Rank #2
Sale
UGREEN NAS DXP2800 2-Bay for Advanced Home Users, Remote Workers & Creators
  • 【Advanced Home Data & Media Hub】For advanced home users who need phone backup, file storage, and centralized data management. Centralize family photos, 4K videos, movies, computer backups, and personal files in one place while running multiple apps for home entertainment and everyday data management. Suitable for households with growing digital libraries and multiple NAS use cases.
  • 【Built for Creators, Media Servers & Advanced Apps】Powered by the Intel N100 Quad-Core CPU, 8GB DDR5 RAM, 2.5GbE networking, and dual M.2 NVMe slots, DXP2800 handles large files and heavier workloads with ease. Run Docker, virtual machines, and media server applications compatible with Plex—ideal for content creators, tech enthusiasts, and advanced home users managing 4K videos, RAW photos, personal media libraries, and multiple NAS apps.
  • 【Up to 80TB for Growing Digital Libraries】 Supports up to 80TB of storage using two HDD bays and two M.2 NVMe SSD slots for family photos, movies, RAW photos, 4K videos, work files, and device backups. AI photo management supports recognition of people, objects, scenes, and locations, album organization, and duplicate photo detection. HDDs and SSDs are not included.
  • 【AI-powered Home Surveillance】Turn DXP2800 into a centralized home surveillance hub by connecting compatible network cameras and storing recordings locally on your NAS. AI-powered features include Face Recognition, People Detection, and Pet Detection, helping advanced home users review important events more efficiently while managing home surveillance and personal data in one place.
  • 【One data Center Across Your Devices】Keep files from desktops, laptops, phones, tablets, and other devices together instead of scattered across cloud accounts and external drives. Access, back up, organize, and share data across Windows, macOS, Android, iOS, web browsers, and compatible smart TVs—ideal for creators and advanced home users working across multiple devices.

Configure WordPress database settings

WordPress reads its database configuration from wp-config.php. The important values are the database name, username, password and host. For a direct RDS connection, the host is the RDS endpoint. With Cloud SQL Auth Proxy, the host must address the proxy locally—through its TCP listener or Unix socket—not the Cloud SQL instance’s public address by default.

A conventional configuration has this shape; substitute values from your own database and proxy or provider setup:

define( 'DB_NAME', 'wordpress_prod' );
define( 'DB_USER', 'wordpress_app' );
define( 'DB_PASSWORD', getenv( 'WORDPRESS_DB_PASSWORD' ) );
define( 'DB_HOST', '127.0.0.1:3306' );

This example assumes the proxy listens on local TCP port 3306. Use the actual listener port or the provider-supported socket format in your runtime. If connecting directly to RDS, set DB_HOST to the RDS endpoint and port in the format supported by your WordPress/PHP environment. Do not copy the example host literally unless it matches your running proxy. The environment-variable approach also assumes your deployment injects WORDPRESS_DB_PASSWORD; otherwise use the secret facility available in your host rather than leaving the application with an unset password.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before deployment, check file permissions and release practices so that configuration secrets are not exposed through a web-accessible backup, source repository or diagnostic output. Make configuration changes in a controlled release and retain a known-good rollback path.

Rank #3
BUFFALO LinkStation 210 2TB 1-Bay NAS Network Attached Storage with HDD Hard Drives Included NAS Storage that Works as Home Cloud or Network Storage Device for Home
  • Value NAS with RAID for centralized storage and backup for all your devices. Check out the LS 700 for enhanced features, cloud capabilities, macOS 26, and up to 7x faster performance than the LS 200.
  • Connect the LinkStation to your router and enjoy shared network storage for your devices. The NAS is compatible with Windows and macOS*, and Buffalo's US-based support is on-hand 24/7 for installation walkthroughs. *Only for macOS 15 (Sequoia) and earlier. For macOS 26, check out our LS 700 series.
  • Subscription-Free Personal Cloud – Store, back up, and manage all your videos, music, and photos and access them anytime without paying any monthly fees.
  • Storage Purpose-Built for Data Security – A NAS designed to keep your data safe, the LS200 features a closed system to reduce vulnerabilities from 3rd party apps and SSL encryption for secure file transfers.
  • Back Up Multiple Computers & Devices – NAS Navigator management utility and PC backup software included. NAS Navigator 2 for macOS 15 and earlier. You can set up automated backups of data on your computers.

Test the connection before relying on the site

  1. From the WordPress runtime, confirm that the proxy is running or the database endpoint is reachable through the intended network path.
  2. Run wp db connect from the WordPress installation environment. WP-CLI uses the database credentials loaded from wp-config.php and, if successful, opens a database client session.
  3. Confirm that the selected database is the intended one and that the application account can perform the operations WordPress requires.
  4. Load the site and review application and database logs for connection failures before directing normal traffic to the new database.

A successful network check alone is not sufficient: WordPress must also authenticate to the right database with the right account. Conversely, a correct password cannot compensate for a blocked route or a stopped proxy.

Troubleshoot “Error establishing a database connection”

Check one layer at a time, in this order, so a network error is not mistaken for a credential problem.

Database name, username or password is wrong

Compare the values in wp-config.php with the database and user actually created. Check that the deployed secret is present in the WordPress process environment and that the application is not using stale configuration from an earlier release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Host, port or socket does not match the connection path

For direct RDS, use the database endpoint and configured port. For Cloud SQL through the Auth Proxy, use the proxy’s local TCP listener or socket. Confirm the proxy’s current listener configuration and that WordPress is running in the environment that can reach it.

Rank #4
Synology DS225+ Private Cloud Media Server - Stream, Back Up Photos & Share Files, Intel CPU for Hardware Transcoding (2-Bay Diskless NAS)
  • Your Personal Streaming Server - Build your own Netflix-style media library and stream 4K movies, shows and photos to any device without monthly fees
  • Create Your Own Cloud - Store your entire photo, video and music collection; access from anywhere with fast 282 MB/s transfer speeds
  • Creator-Grade Backup Solution - Protect your irreplaceable content with automated backups to cloud services, external drives and remote NAS
  • Multi-Layered Data Protection - Combine RAID redundancy, automated backups and snapshot technology to prevent data loss from any cause
  • Smart Home Surveillance - Support up to 30 IP cameras with AI detection, instant alerts and secure remote monitoring

Database is stopped or not ready

Check the provider’s database status and logs. Wait for an operation or restart to complete before treating a connection timeout as a credentials issue.

Firewall, security group or VPC route blocks access

Confirm the WordPress runtime’s actual source path, the destination port, VPC peering or VPC access, and the database ingress rule. In the documented Lightsail-to-Aurora setup, verify same-Region placement and peering as well as the security-group ingress. Do not solve a narrow routing problem by allowing unrestricted inbound connections.

Cloud SQL proxy authorization or health is wrong

Check that the Cloud SQL Admin API is enabled, the proxy identity has the Cloud SQL Client role, and the supervised proxy process is running with its intended credentials. For private IP, verify VPC access and the proxy’s private-IP configuration. Keep the proxy listener local rather than exposing it publicly.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

TLS or engine/client compatibility is mismatched

For RDS, check the current TLS requirements and client configuration. For any provider, verify that the PHP database client and managed engine combination is supported by the WordPress release you deploy. Do not infer compatibility from a successful connection to a different engine or environment.

Best Value
Synology 2-Bay DiskStation DS223j (Diskless)
  • Secure private cloud - Enjoy 100% data ownership and multi-platform access from anywhere
  • Easy sharing and syncing - Safely access and share files and media from anywhere, and keep clients, colleagues and collaborators on the same page
  • Automated Backup Protection - Set-and-forget backups for Macs, PCs and mobile devices to multiple destinations including cloud and external drives
  • Home Security System - Record and monitor your property 24/7 with support for multiple IP cameras and remote viewing
  • 2-Year Warranty - Reliable hardware backed by Synology's expert customer support team and ongoing software updates
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Production readiness, reliability and cost

  • Keep the database private where the architecture permits. Limit inbound access to the application runtime and use a provider-supported encrypted connection route.
  • Make proxy operation durable. A manually started local test proxy can disappear when a shell ends or a machine restarts. Run it under a process supervisor or an equivalent managed runtime mechanism, and ensure its credentials renew or remain valid as intended.
  • Protect and rotate secrets. Use a deployment secret mechanism, scope database privileges to the application and avoid sharing administrative credentials with WordPress.
  • Plan backups, maintenance and monitoring. Select provider settings for backups, availability and maintenance deliberately, then monitor database health and application connection errors. No database configuration guarantees a particular site’s uptime or performance without workload-specific evidence.
  • Measure your own workload before sizing. Page generation, plugins, traffic patterns, query behavior and the network path all affect the outcome. Choose capacity and cost settings using observed requirements rather than assuming a managed database automatically improves speed.

For Google Cloud SQL, the Auth Proxy is a connection component that must be operated as part of the application environment. For AWS, the cited RDS creation guidance provides settings for security, availability, backups and maintenance; the appropriate selections depend on the site’s recovery and operational needs.

Or skip the browser setup

If you need screenshots of your WordPress site while working on its database integration, ScreenshotNeo is a separate website screenshot API and MCP server; it does not configure or connect the SQL database. One GET request can return an image or PDF. For example, this cURL call saves a screenshot of your WordPress site as WebP:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie and consent banners, newsletter popups and chat widgets can be removed before capture; bot checks, blank pages and failed loads are not billed. Its MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo or sign up for the free plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently asked questions

Can I keep WordPress on one host and its database in another cloud?

Yes, if the application runtime has a supported, secure network route to the database and the database engine is compatible with your WordPress version. The exact routing and authorization requirements depend on both providers and the topology.

Does using managed SQL automatically make WordPress faster?

No. Managed operation changes who runs the database service; it does not establish a performance result for a particular site. Measure the application and database under the workload you expect.

Can I use a public database address for the proxy setup?

The Cloud SQL Auth Proxy pattern described here uses a local proxy endpoint for WordPress. Follow the provider’s current connection guidance for your chosen configuration rather than substituting a public address or exposing the proxy listener.

Quick Recap

Bestseller No. 3
BUFFALO LinkStation 210 2TB 1-Bay NAS Network Attached Storage with HDD Hard Drives Included NAS Storage that Works as Home Cloud or Network Storage Device for Home
BUFFALO LinkStation 210 2TB 1-Bay NAS Network Attached Storage with HDD Hard Drives Included NAS Storage that Works as Home Cloud or Network Storage Device for Home
2TB capacity – 1 Drive bay, HDD included.; Made in Japan – Quality Devices.; 24/7 US-based support, with 2-year warranty, including hard drives.
$153.99
Bestseller No. 5
Synology 2-Bay DiskStation DS223j (Diskless)
Synology 2-Bay DiskStation DS223j (Diskless)
Secure private cloud - Enjoy 100% data ownership and multi-platform access from anywhere
$209.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.