MagicWP Docs

Database

View credentials and manage your site's database

Every MagicWP site has its own private MySQL-compatible database (MariaDB). You can view its credentials, browse and edit it with a temporary phpMyAdmin, and rotate its password - all from the dashboard: your site → Database.

Database credentials

The Database page shows everything WordPress uses to connect. Copy any value with the button next to it:

SettingValue
Hostshown on the page
Databasethe database name
Usernamethe database user
Passwordhidden by default - click the eye to reveal

These are the same credentials you use to log in to phpMyAdmin below.

The database is private

Your database isn't exposed to the public internet, so you can't point an external client (MySQL Workbench, TablePlus, …) straight at it. Use the built-in phpMyAdmin to browse and edit it.

Browse with phpMyAdmin

phpMyAdmin is the easiest way to inspect tables, run queries, or export data:

  1. On the Database page, click phpMyAdmin.
  2. Click Activate phpMyAdmin. The first start can take up to a minute while the server prepares it.
  3. Open the link and log in with your database username and password.

The instance is sandboxed to this one site's database and is automatically torn down after 2 hours. You can close it early with Close session now, or activate it again whenever you need it.

Change the database password

Use Change Password to rotate the database credentials:

  1. Click Change Password.
  2. Type a new password or click Generate.
  3. Click Update Password.

Passwords must be 8–64 characters with an uppercase letter, a lowercase letter, and a number (12+ recommended). WordPress's configuration is updated automatically, so your site keeps working - no other change needed.

A password change briefly interrupts the database

Applying the new password drops open database connections for a moment. It's quick and WordPress reconnects on its own, but avoid doing it during a traffic spike.

Safety tips

  • Back up first. Take a backup before running bulk updates or deletes - SQL changes are immediate and can't be undone from phpMyAdmin.
  • Don't drop or rename the WordPress core tables (the wp_ tables) unless you know exactly what you're doing.
  • Prefer WordPress or WP-CLI for content changes; use direct SQL only when you have to.

Optimization

The Optimization tab shows what a WordPress database accumulates and lets you reclaim it.

Table overhead is space MySQL has freed inside a table but not returned to the disk - the result of rows being deleted over time. Optimize rebuilds the tables and gives it back.

Cleanup counts the rows that are usually safe to remove:

ItemWhat it is
Post revisionsOlder copies of posts and pages
Auto-draftsAbandoned drafts WordPress created
Trashed postsStill occupying space until purged
Spam commentsFlagged by your spam filter
Expired transientsCached values past their lifetime

Each is cleared separately and asks you to confirm first, so you can drop the spam without touching your revisions.

Deletions are permanent

Cleanup removes rows outright - there's no trash to recover them from. Revisions in particular are the only copy of what a post used to say. If you're unsure, take a backup first.

Tools

The Tools tab collects the database jobs that aren't everyday edits:

  • Database password - rotate it. WordPress is updated automatically, so the site keeps working.
  • Database prefix - rename all WordPress tables to a new prefix, to harden against attacks that assume the default wp_.
  • Search and replace - run a WP-CLI search-replace across the database, with a dry-run preview first. See Search & Replace.

On this page