Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk9 min

How to Run Database Migrations in Radicle for WordPress

A practical Radicle and Acorn migration guide covering database/migrations files, WP-CLI commands, staging, deployment hooks, verification, rollback, and the difference between schema changes and full-site data moves.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In a Radicle WordPress project, run pending database migrations from the project root with wp acorn migrate. Radicle uses Roots Acorn to provide Laravel-style migrations: files live in database/migrations/, Acorn records completed files in a migrations table, and pending files run in timestamp order.

The reliable workflow is to generate and review a small, reversible migration, commit it to Git, test it against a backup in staging, then run the same command during deployment. Use wp acorn migrate:status to inspect state and wp acorn migrate:rollback to undo the most recently applied batch when its down() method is safe to execute.

As an Amazon Associate I earn from qualifying purchases.

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.

What a Radicle migration changes

Radicle is a WordPress application structure that uses Roots Acorn to bring Laravel conventions, including migrations, into WordPress. An Acorn migration changes the application database schema: it can create a custom table, add a column, add an index, or remove a structure that the application no longer needs.

This is different from moving a complete WordPress site between environments. A schema migration does not copy posts, media, users, options, or other row data from one database to another. If the job also requires copying content and options and rewriting environment-specific URLs, use a full-site migration workflow instead of treating an Acorn migration as a data-transfer tool.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

How Acorn tracks work

Each generated migration has a timestamped filename. Acorn reads the files in timestamp order and stores the migrations it has applied in a database table named migrations. When you run the migrate command again, Acorn compares the files with that record and executes only the pending ones.

Because the migration files and the tracking table are separate, both matter. The files describe the intended schema change; the table records which changes have already run in that environment. Never delete or edit an already-applied migration casually: another environment may still depend on the original file and order.

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

Prerequisites before creating a migration

  • A working Radicle project with Acorn and WP-CLI available from the project directory.
  • Database credentials configured for the environment where the command will run.
  • Permission for the database user to create or alter the tables involved.
  • A tested backup before any production schema change.
  • A staging environment in which the migration can be run against a representative database.
  • A Git workflow that delivers the same migration files to local, staging, and production.

Run commands from the directory that contains the WordPress installation and the Radicle application files. If WP-CLI cannot find Acorn, first correct the working directory, PHP runtime, or project bootstrap rather than trying to run the migration against a different installation.

Create a migration file

Generate a migration with WP-CLI:

wp acorn make:migration create_app_settings_table

Acorn places the generated PHP file in database/migrations/. The timestamp in its filename determines its position relative to other migrations, so use a descriptive name that states the structural change rather than the feature’s marketing name.

Keep the change focused

One migration should represent one coherent schema change. A small migration is easier to review, test, deploy, and reverse. If a feature needs a new table and several later indexes, separate those changes when doing so keeps the dependency order clear.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Open the generated file and implement its two methods:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • up() applies the change when the migration runs.
  • down() reverses that change when the migration batch is rolled back.

Use Laravel’s schema builder through Acorn rather than embedding database-specific SQL when the schema builder expresses the requirement clearly. A representative table migration looks like this:

<?php

use IlluminateDatabaseMigrationsMigration;
use IlluminateDatabaseSchemaBlueprint;
use IlluminateSupportFacadesSchema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('app_settings', function (Blueprint $table) {
            $table->id();
            $table->string('setting_key')->unique();
            $table->text('setting_value')->nullable();
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('app_settings');
    }
};

The exact columns depend on the application. Define required fields, nullability, indexes, and timestamps deliberately. If application code expects a unique key or an index for a frequent lookup, include it in the migration rather than relying on a manual database operation that will be missing from the next environment.

Make rollback behavior explicit

A reversible down() method is the safest default. For a table creation, dropping that table is usually straightforward. For destructive changes such as dropping a column or deleting data, a rollback may not restore the lost values. In those cases, take a tested backup first and document the recovery plan; do not assume that migrate:rollback can reconstruct deleted data.

After editing the file, review it as code. Confirm that the table name matches the application, that indexes are intentional, and that the reverse operation targets exactly what up() created. Then commit the migration file to Git. The commit is what makes the ordered change set available to every environment.

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
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Inspect pending and completed migrations

Before applying anything, ask Acorn for the migration state:

wp acorn migrate:status

The status output lists migration files and identifies which have run. Use it in local development, staging, and production to verify that the environment is at the revision you expect. If a file is marked pending unexpectedly, check that the deployment contains the latest Git commit and that WP-CLI is connected to the intended database.

Check the surrounding WordPress schema

When diagnosing a mismatch, compare the custom schema with WordPress’s own tables. WordPress documents wp_get_db_schema() as a way to retrieve the SQL used to create core tables. Its scopes cover all tables as well as global, multisite-global, and blog tables.

WP-CLI also provides:

wp db tables

This lists tables registered to $wpdb. The command supports all, blog, global, and multisite-global scopes, which is useful when determining whether a table exists in the expected site or network scope. These inspection commands do not apply an Acorn migration; they help you verify what is present before and after it runs.

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

Run migrations locally or in staging

Apply all pending migrations with:

wp acorn migrate

Acorn runs pending files in timestamp order and records each successful migration in the migrations table. Let the command finish and inspect its output for errors. A successful command does not prove that application behavior is correct, so exercise the feature that depends on the new table or column and rerun wp acorn migrate:status.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

A safe staging sequence

  1. Deploy the exact Git revision that will be used in production.
  2. Take or refresh a staging database backup using your existing backup process.
  3. Run wp acorn migrate:status and record the pending files.
  4. Run wp acorn migrate from the staging project root.
  5. Check the command output and run wp acorn migrate:status again; the intended files should now be marked as run.
  6. Use wp db tables and, where useful, wp_get_db_schema() to verify the resulting table structure.
  7. Exercise the application paths that read and write the changed schema.
  8. Test the documented down() behavior only when a rollback test is appropriate for that migration, then restore the staging database or reapply the migration as your release process requires.

Staging is where you discover long-running alterations, missing permissions, incompatible application code, and assumptions about existing data. Do not use a production rollback as your first test of reversibility.

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

Run migrations during deployment

The migration command should run against the release that contains the migration files. Running it before the new code is available can leave the database ahead of the application; running it from an old release can leave the new migration files invisible.

Manual SSH execution

For a controlled release, an operator can run the command over SSH:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ssh user@host -p port 'cd /path/to/site && wp acorn migrate --force'

The --force option allows the command to proceed in a non-interactive production context. Replace the user, port, and path with the values for the target server. Confirm the working directory and database environment before pressing Enter, and retain the terminal output in the deployment record.

Trellis deployment hook

With Trellis, add an Acorn migration task to deploy-hooks/finalize-after.yml and set its working directory to the newly deployed release path:

- name: Run Acorn migrations
  command: wp acorn migrate --force
  args:
    chdir: "{{ deploy_helper.new_release_path }}"

This places the schema step in the finalize phase, after the new release has been prepared. Keep the hook in version control, ensure the deploy user has the required database permissions, and make the task’s output visible in your deployment logs.

Manual versus automated execution

Concern SSH command Trellis or CI hook
Repeatability Depends on an operator entering the right path, environment, and command each time. Encodes the command and release path in version-controlled deployment configuration.
Access control Requires a person or service account with SSH and database access. Uses the deployment runner’s credentials; restrict the runner and secret storage carefully.
Logging Terminal output must be retained by the operator or deployment system. Normally appears in the deployment log for later auditing.
Rollback handling The operator must stop, assess the error, and follow the documented recovery plan. The pipeline can fail the release, but database recovery still requires a tested backup and an explicit plan.
Staging coverage Requires a separate, deliberate staging run. Can be added as a stage or gate before production.

Automation improves consistency; it does not make a destructive migration reversible. Keep staging and backup gates even when the command is fully automated.

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

Verify a production migration

After deployment, verify both Acorn’s record and the database itself:

  1. Check the deployment log for a successful wp acorn migrate --force exit.
  2. Run wp acorn migrate:status against the production release and confirm the expected files are marked as run.
  3. Use wp db tables to confirm that a newly created table is visible through $wpdb.
  4. For a core-schema comparison, retrieve the appropriate scope with wp_get_db_schema() and compare it with the environment’s actual tables.
  5. Exercise the feature that depends on the migration, including a write path and a read path where both exist.

If the command reports that there are no pending migrations but the feature fails, the problem may be application configuration, an incorrect database connection, or a migration that created a different structure than the code expects. The status command only reports Acorn’s migration records; it is not a substitute for testing the feature.

Rollback and failure recovery

Undo the latest batch

To reverse the most recently applied migration batch, run:

wp acorn migrate:rollback

Acorn calls each migration’s down() method for that batch. A batch can contain more than one migration, so read the command output and inspect the files before treating rollback as a single-file undo. Rollback is appropriate only when the down() methods are safe and the application can tolerate the schema moving backward.

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

When migration execution fails

  • Command not found or Acorn unavailable: verify that you are in the Radicle project root and using the PHP/WP-CLI environment configured for that release.
  • Permission or connection error: verify database credentials, host selection, and the database user’s DDL permissions. Do not switch to an unrelated database just to make the command succeed.
  • Table or column already exists: inspect wp acorn migrate:status and the actual tables. The migration may have run partially, or someone may have changed the schema manually.
  • Application errors after success: compare the code revision and schema, check the migration’s column definitions and indexes, and use staging to reproduce the failure.
  • Destructive change needs recovery: stop the release and use the tested database backup process. A rollback method cannot restore data that the migration deleted.

Do not edit the migrations table by hand as a first response. Preserve the command output, identify the failing migration, and make the next corrective change as a new, reviewed migration whenever possible.

Schema migration versus a full WordPress site move

Choose the tool according to the job:

Need Appropriate approach What it does
Add or alter application tables and columns Radicle/Acorn migration Runs versioned PHP migrations and records them in the migrations table.
Copy posts, pages, users, media references, options, and other environment data Full-site migration workflow Exports and imports database content and may perform find-and-replace for environment-specific URLs.
Inspect whether expected tables exist wp db tables and wp_get_db_schema() Reports the current WordPress-visible tables or returns core-table creation SQL for comparison.

WP Migrate materials describe exports, find-and-replace operations, and push/pull migrations for the second category. Those operations solve data movement; they do not replace Acorn’s ordered schema history.

Operational checklist

  • Generate with wp acorn make:migration.
  • Keep the file in database/migrations/ and commit it to Git.
  • Implement and review both up() and down().
  • Run wp acorn migrate:status before changing a database.
  • Back up production using the site’s established process and test the migration in staging first.
  • Apply with wp acorn migrate locally or in staging; use --force for a non-interactive deployment command.
  • Run the command from the new release directory, not an older release.
  • Verify status, table structure, and the application feature after deployment.
  • Use wp acorn migrate:rollback only for a known, safe latest batch.
  • Use a full-site migration workflow when the requirement is copying content and options, not merely changing schema.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.