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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Connect WordPress to a remote MySQL or MariaDB server by giving the web host a private route to the database, allowing the database port only from the web host’s private address, creating a dedicated least-privilege account, and placing the database hostname and credentials in wp-config.php. Test DNS, routing, the TCP port, and the credentials from the WordPress host before diagnosing WordPress. Keep browser administration on HTTPS even though the database traffic stays on a private network.

What a private remote-database WordPress setup is

In a conventional installation, PHP and the database run on the same server, so WordPress connects through a local socket or loopback address. In a remote design, the WordPress web host runs PHP and serves files while MySQL or MariaDB runs on a separate machine. Every database query crosses a routed private network.

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

The database does not need to be reachable from the public internet. A private DNS name or private IP resolves inside the connected network, and a firewall or security group accepts the database port only from the web host’s private address or narrowly defined subnet. Database authentication remains mandatory: private reachability is an additional access-control layer, not a replacement for a password and grants.

This arrangement is useful when you need independent database backups, a separately sized database server, isolation between public web services and data, or a provider-managed database. It also introduces a network dependency. Latency, packet loss, route changes, DNS failures, and database connection limits can now affect page requests, administration, and background jobs.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Prerequisites and compatibility

Have these items ready before editing WordPress:

  • A WordPress host and a MySQL or MariaDB host joined by a routable private network. The hosts can be in one private subnet, connected through a site-to-site VPN, or linked through provider peering or a private endpoint.
  • A database created specifically for this WordPress installation and a unique database account used by that installation.
  • The database server’s private hostname or address, its listening port, and the private address of the WordPress host.
  • A firewall, security group, or network ACL that permits the database port only from the WordPress host’s private address or required private subnet.
  • Administrative access to create the schema, account, grants, listener configuration, and firewall rule.
  • A supported software baseline. WordPress’s current requirements page recommends PHP 8.3 or newer, MySQL 8.0 or newer, MariaDB 10.11 or newer, and HTTPS. The WordPress Hosting Handbook lists MySQL 8.4 LTS and MariaDB 11.8 LTS among newer long-term-support branches. Check the live requirements page and your provider’s lifecycle policy because supported versions change.
Component Current recommendation Why it matters
PHP 8.3 or newer WordPress executes here; an old PHP branch can be unsupported even when the database connection works.
Database engine MySQL 8.0+ or MariaDB 10.11+ Use a supported engine and confirm compatibility with your plugins and host.
Database protocol support mysqli and, where required, OpenSSL/TLS support PHP must have the database extension WordPress uses, and encrypted connections may require SSL support.
Transport to visitors and administrators HTTPS A private database link does not encrypt browser-to-site login or administration traffic.

Choose the private-network topology

The best option depends on where the two systems run and what your provider supports. Compare the network path before you provision anything.

Option Exposure Operational complexity Latency and failure behavior When it fits
Shared private subnet or VPC Database has no public listener; traffic stays on the provider’s private fabric. Usually the simplest when both hosts are in the same provider network. Typically the shortest path, but both services depend on that private network and its routing. Web and database servers in one cloud or data-center network.
Site-to-site VPN Database remains on a private address behind the tunnel. Requires tunnel endpoints, key management, route distribution, monitoring, and renewal procedures. Encryption and tunnel overhead add latency; a tunnel outage breaks database access until failover or repair. Separate clouds, offices, or hosting networks that cannot share a subnet.
Private endpoint or provider peering Uses a provider-supported private service path rather than a public database endpoint. Often simpler than operating a VPN, but depends on provider-specific configuration and regional support. Usually predictable within the provider; endpoint or peering failures must be monitored. A managed database that offers private connectivity.
Public endpoint with an IP allow-list The service is internet-addressable even if only one source IP is allowed. Easy to deploy, but public DNS, certificate, patching, and allow-list management remain concerns. Internet routing can add variability and a public endpoint is another attack surface. Only when private connectivity is unavailable and compensating controls are documented.

If the requirement is explicitly a private network, use a private subnet, private endpoint, or VPN. Do not describe a public endpoint with an allow-list as equivalent isolation.

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

Step 1: Create a database and a dedicated account

Run these statements on the database server with an administrative account. Choose names that are unique to this site; do not reuse an account shared by another application.

CREATE DATABASE wordpress_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'wordpress_app'@'10.20.30.40' IDENTIFIED BY 'use-a-long-unique-secret';
GRANT SELECT, INSERT, UPDATE, DELETE ON wordpress_db.* TO 'wordpress_app'@'10.20.30.40';
FLUSH PRIVILEGES;

Replace 10.20.30.40 with the WordPress host’s private address, or use the narrow private source pattern your database and network design requires. A source restriction in the account complements the firewall; it should not be the only control.

For normal WordPress operations such as publishing, media uploads, comments, user creation, and plugin installation, the WordPress Hosting Handbook identifies SELECT, INSERT, UPDATE, and DELETE as the required data privileges. Avoid global, administrative, or grant-option privileges. An initial installer that must create or alter tables may need a controlled schema-preparation step; a safer pattern is to pre-create or import the tables with a separate administrative process, then leave the runtime account with only the four data privileges. Document and remove any temporary elevation.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Use a long secret that is not used elsewhere. Keep it out of shell history, issue trackers, chat, and logs. Store it in the protected configuration file or an approved secret-management system.

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

Step 2: Bind the database to the private path and restrict the firewall

Configure MySQL or MariaDB to listen on the private interface required by your topology. The exact configuration filename differs by operating system and package, so use the database vendor’s configuration layout for your installation. Do not bind a public interface merely because it is convenient. If the service must listen on more than one interface, explicitly justify each one.

Allow inbound TCP traffic on the database port—normally 3306—only from the WordPress host’s private address or the smallest private subnet that genuinely needs access. Apply the rule at every relevant layer: cloud security group, host firewall, VPN or subnet ACL, and any managed-database access list. Remove broad rules such as an entire internet range. WordPress hardening guidance specifically recommends disabling unnecessary remote TCP access.

After changing the listener or firewall, reload the database service according to your operating system and verify that it is listening on the intended private address. A listening socket alone does not prove that the route or firewall permits the web host.

Step 3: Prove DNS, routing, the port, and credentials from the WordPress host

Perform these checks on the WordPress server, not on your laptop. They isolate network faults before WordPress adds PHP, configuration, or plugin variables.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
  1. Resolve the private name. Run getent hosts db.internal.example or the resolver tool provided by your operating system. Confirm the result is the intended private address, not a public address or stale record.
  2. Check the route. Run ip route get 10.20.30.50, replacing the address with the database server’s private IP. The output should show the expected private interface and gateway. A missing route must be fixed in the subnet, VPN, peering, or host routing configuration.
  3. Test the TCP port. Run nc -vz db.internal.example 3306 or an equivalent TCP test. A timeout usually indicates a route, security-group, firewall, or listener problem. A refusal normally means the host is reachable but no permitted service is listening on that address and port.
  4. Authenticate with the same values WordPress will use. Run mysql --protocol=TCP -h db.internal.example -P 3306 -u wordpress_app -p wordpress_db -e 'SELECT 1;'. Enter the password interactively. The SELECT 1 result proves name resolution, routing, port access, authentication, and access to the selected schema.
  5. Check the account source and grants if login fails. On the database server, inspect the account’s host restriction and run SHOW GRANTS FOR 'wordpress_app'@'10.20.30.40'; with an administrative account. Ensure the source address seen by the database matches the account definition; a VPN or NAT can make it different from the web host’s local address.

Do not move to WordPress configuration until the client test succeeds. This order prevents a misspelled hostname from being mistaken for a PHP or plugin failure.

Step 4: Set the WordPress connection constants

Edit the wp-config.php file for the installation and use the exact database, account, password, and private hostname that passed the client test.

define( 'DB_NAME', 'wordpress_db' );
define( 'DB_USER', 'wordpress_app' );
define( 'DB_PASSWORD', 'use-a-long-unique-secret' );
define( 'DB_HOST', 'db.internal.example' );

DB_HOST is the database server hostname, not a URL. Do not add https://, a path, or whitespace. If the server uses a non-default port, follow the host’s documented syntax by appending the port, for example define( 'DB_HOST', 'db.internal.example:3307' );. Use the same port in the command-line test. Managed services sometimes publish a provider-specific hostname and port; copy those values exactly.

Protect the file so only the web-service account and authorized administrators can read it. Never print the file in diagnostics or commit it to a public repository. After saving, reload PHP workers if your deployment caches configuration outside normal PHP file loading.

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

Step 5: Install a new site or migrate an existing one

New installation

Open the site over HTTPS and complete the installer. If the runtime account has only data privileges and the installer cannot create tables, prepare the schema with a separate administrative process or follow your hosting provider’s documented installation workflow; do not permanently grant global administration to the runtime account merely to make the installer pass.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Existing installation

  1. Put the site into a maintenance window or otherwise prevent writes during the final export so that posts, comments, orders, and user changes are not lost.
  2. Export the complete source database, including tables, views if used, character-set information, and any required routines. Transfer the dump through a protected private channel and import it into the new database.
  3. Copy the WordPress files and wp-content/uploads data according to your deployment plan. The database alone does not contain media files, themes, or plugins.
  4. Verify the table prefix in wp-config.php matches the imported tables. A prefix mismatch can look like a missing-installation error even when the connection is healthy.
  5. Check the site URL and home URL values for the intended hostname. If the hostname changes, plan URL replacement carefully so serialized WordPress data is not corrupted by a raw text substitution.
  6. Point the web host at the private database, run the client test again, and open the site. Test login, an administrator page, a new draft, media upload, comments if enabled, scheduled tasks, and any plugin that uses custom tables.
  7. Keep the old database read-only or available for rollback until backups and application checks confirm the cutover. Then remove obsolete accounts and firewall rules.

Step 6: Keep administration encrypted

The private database path protects one server-to-server segment; it does not protect a visitor’s browser connection. Serve the site and administration over HTTPS, and enforce secure administration with the WordPress constant:

define( 'FORCE_SSL_ADMIN', true );

Set this only after HTTPS works end to end. If TLS terminates at a reverse proxy or load balancer, configure the proxy and WordPress to preserve the original HTTPS state. Otherwise WordPress may see every request as HTTP and create redirect loops or mixed-content behavior. Test login, the dashboard, media uploads, REST requests, and cron callbacks after enabling the setting.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to troubleshoot a failed connection

Follow this order; changing several layers at once makes the fault harder to identify.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Symptom Likely layer Checks and corrective action
Private hostname does not resolve DNS or resolver configuration Run the resolver command on the WordPress host. Correct the private DNS zone, search domain, or resolver assignment. Confirm the name is not returning a public address.
Connection times out Route, ACL, security group, or firewall Check ip route, VPN or peering status, source and destination rules, and host firewall logs. Confirm the database port is allowed from the actual source address.
Connection is refused Listener or bind address Verify MySQL/MariaDB is running and listening on the private interface and expected port. A service bound only to loopback cannot accept the remote host.
Access denied for user Credentials or account host restriction Repeat the client command with the exact username, password, host, and port from wp-config.php. Inspect SHOW GRANTS and the account’s permitted source host.
Client succeeds but WordPress reports an error Configuration, PHP extension, or file permissions Check spelling and quoting of all four constants, confirm PHP has mysqli, verify the web process can read wp-config.php, and review the PHP/web-server error log without exposing the password.
Works intermittently or pages are slow Latency, packet loss, saturation, or connection limits Measure from the web host during normal and peak load. Review database connection counts, slow-query logs, CPU, memory, storage latency, and network errors. Fix the path or query workload rather than repeatedly increasing timeouts.
HTTPS redirect loop after enabling secure admin Reverse-proxy HTTPS forwarding Make the proxy forward the original secure state and configure WordPress to trust that signal. Test direct-origin and proxied requests separately.

When a password contains special characters

The password value in wp-config.php is a PHP string, so quote and escape it according to PHP syntax. Do not URL-encode it unless the database client or provider explicitly requires that format. Test the exact value interactively with the MySQL client before changing the file.

When the database provider requires TLS

Private networking and database TLS solve different problems. A private path reduces exposure; TLS can protect traffic from inspection inside a shared or tunneled network. If the provider requires certificate verification or client certificates, install the required CA and configure the PHP database client using the provider’s documented method. Confirm that the PHP build includes the needed SSL support and test from the WordPress host.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Security decisions that matter after it works

  • Narrow network reachability. Permit only the WordPress host or necessary private subnet. Remove temporary administrator IP ranges and unused public listeners.
  • Least privilege. Keep the runtime account limited to its own schema and normal data operations. Separate backup, migration, and schema-administration accounts from the account PHP uses on every request.
  • Secret handling. Restrict read access to wp-config.php, rotate the database password through a controlled procedure, and redact credentials from support bundles and logs.
  • Patch discipline. Keep PHP, WordPress, MySQL or MariaDB, operating systems, and network appliances on supported security branches. WordPress notes that older versions may continue to run but have reached official end of life and can expose sites to vulnerabilities.
  • Administrative HTTPS. Require HTTPS for login and dashboard traffic even when the database is entirely private.
  • Auditing. Record firewall changes, account grants, schema migrations, and backup restores. Alert on unexpected source addresses, repeated authentication failures, and new public listeners.

Performance, capacity, and reliability

A remote database adds at least one network round trip to database work. Actual impact depends on distance, routing, connection setup, query count, query complexity, packet loss, and database load. There is no universal latency threshold that guarantees a WordPress installation will be fast. Measure the deployment you are operating.

Keep the web and database servers in the same private region or data center when low latency matters. Watch request latency alongside database query latency so you can distinguish application work from network delay. Enable slow-query analysis in a way that avoids logging secrets, and review indexes and plugin queries before simply increasing server size.

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

Connection limits deserve separate attention. PHP workers can create bursts of simultaneous connections during traffic spikes, cron runs, imports, or cache misses. Set database and PHP worker limits deliberately, monitor rejected connections, and ensure the database has enough memory and file descriptors. A larger connection pool does not repair a saturated database or a lossy VPN.

Design for the private path’s failure modes. A second web server may still be useless if every server depends on one database address. If the database supports failover, use its documented private endpoint or controlled DNS mechanism and test how clients reconnect. Keep DNS time-to-live, failover behavior, and application recovery expectations documented rather than assuming a new address will be discovered instantly.

Backups and recovery for a split deployment

Back up the database and the WordPress files as separate but coordinated assets. A database dump cannot restore uploads, themes, or plugins, while a file backup cannot restore posts, settings, users, or custom-table data. Encrypt backups, restrict their access, and transfer them over a protected path.

Test a restore on an isolated private network. Verify that the restored database accepts the application account, that the table prefix and URLs are correct, and that the restored files match the database’s media references. Record the exact steps to change the private hostname, firewall rule, and credentials during a database replacement. A backup that has never been restored is not a demonstrated recovery plan.

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

Operational checklist

  • Both hosts have private addresses and a tested route between them.
  • Private DNS resolves the database name correctly from the WordPress host.
  • MySQL or MariaDB listens on the intended private interface and port.
  • Firewall and security-group rules allow only the required private source.
  • The dedicated account can access only the WordPress schema.
  • The command-line client succeeds from the WordPress host using the exact production values.
  • DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST match the tested values.
  • Existing sites have imported tables, matching prefixes, correct URLs, and copied uploads.
  • HTTPS works through every proxy, and secure administration is tested before enforcement.
  • Slow queries, connection failures, database resource usage, firewall events, backups, and restore tests are monitored.
  • Rollback, password rotation, database replacement, and private-network failover procedures are written down and rehearsed.

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.