Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon 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 Now×
Skip to content
VGSources
Blog

How to Run Database Migrations in Radicle for WordPress

A practical guide to Radicle and Roots Acorn migrations: generate files in database/migrations, apply and roll back batches safely, inspect WordPress tables, and automate migrations during deployment.
WorldRadicle for WordPress Length12 min Posted Quest giverVGSources Team

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.

Radicle runs Laravel-style database migrations through Roots Acorn. Generate a migration with wp acorn make:migration, keep the resulting PHP file in database/migrations/, review its up() and down() methods, then apply pending files with wp acorn migrate. Acorn records completed migrations in a migrations table and runs them in timestamp order. The same command can be placed in a deployment hook so staging and production apply the exact files committed to Git.

What a Radicle database migration does

Radicle is a WordPress project structure that uses Roots Acorn to provide Laravel-inspired application services, including migrations. An Acorn migration changes database structure under version control: it can create a custom table, add a column, add an index, or remove a structure that the application no longer needs. It is not a general-purpose copy of a WordPress site.

As an Amazon Associate I earn from qualifying purchases.

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

Each migration is a PHP class with two lifecycle methods. up() describes the change to apply; down() describes how to reverse it. Acorn stores the migration name and batch number in the database’s migrations table. When you run the migrate command, it compares files in database/migrations/ with that record and executes only files that have not run, in their timestamp order.

Schema change versus data transfer

Use an Acorn migration when the question is “What tables or columns should this application have?” Examples include creating an app_settings table or adding an index needed by a query.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

A full environment move asks a different question: “How do I copy posts, users, options, uploads, and other data from one WordPress installation to another, possibly rewriting environment-specific URLs?” Database export/import and find-and-replace tools, including the WP Migrate materials documented by WP Engine, address that job. Do not substitute a schema migration for a content transfer; running wp acorn migrate will not copy production content into staging.

Prerequisites and a safe change plan

Run commands from the Radicle project that contains the WordPress installation and Acorn’s WP-CLI integration. Your deployment user needs permission to execute WP-CLI and connect to the intended database. Before changing production, establish all of the following:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • The migration file is committed to the same Git change as the application code that depends on it.
  • The code has been deployed to a staging environment with a representative database.
  • You have run the migration in staging and exercised the feature that uses the new schema.
  • A tested database backup or snapshot is available through the site’s existing backup process. There is no single backup command prescribed for every Radicle installation, so use the procedure already supported by your host or operations team.
  • You know which database the current shell points to. A mistaken environment variable or working directory can run a valid migration against the wrong site.

Plan whether the change is compatible with the code currently serving traffic. For a deployment that briefly contains old and new application versions, prefer additive changes first (for example, add a nullable column before code starts writing it), then remove obsolete structures in a later release after the old code is gone.

Create a migration file

From the project directory, ask Acorn to generate a migration:

wp acorn make:migration create_app_settings_table

The command creates a timestamped PHP file under database/migrations/. The timestamp is significant: Acorn uses it to determine execution order when several migrations are pending. Keep the generated filename and class structure intact unless you understand how the project loads migrations.

Where files belong

Radicle/Acorn migrations belong in the project-level database/migrations/ directory. They are source code, not uploads, and should not be edited directly in a production database. Add them to Git so a fresh checkout, staging release, and production release all contain the same ordered change set.

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

A representative table migration

A migration normally uses Acorn’s Laravel-compatible schema builder. A simplified table-creation migration looks like this:

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
<?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('name')->unique();
            $table->text('value')->nullable();
            $table->timestamps();
        });
    }

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

The exact columns should follow the application requirement. Define keys and indexes deliberately rather than adding them later under production load. Use a reversible operation in down() where practical. For a column addition, down() would remove that column; for a new index, it would drop the index. If a transformation cannot be safely reversed, document that operationally and take a verified backup before applying it.

Keep migrations small and ordered

One migration should represent one coherent schema change. Small files make code review, failure diagnosis, and rollback easier. Avoid editing a migration that has already run in a shared environment; create a new migration for the correction. Otherwise, two environments can have the same filename recorded as completed but different code behind it.

Inspect pending migrations before applying them

Use Acorn’s status command to see what the project knows about:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp acorn migrate:status

The output lists migration files and identifies which have run. Review the pending entries, their timestamp order, and the target environment before making any change. A migration shown as already run will not be executed again merely because the command is repeated.

Status is also useful when a deployment reports a schema error. It distinguishes a file that has never run from a file Acorn considers complete, helping you avoid “fixing” a problem by running the same migration repeatedly.

Apply migrations manually

To apply all pending migrations in the current environment, run:

wp acorn migrate

Acorn executes pending files in timestamp order and records the successful work in its migrations table. If several files are applied in one invocation, they are grouped into a batch. Keep the command’s output in your deployment log; it provides the migration names and makes a later incident easier to correlate with a release.

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.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Run from the correct directory

WP-CLI must load the Radicle installation and its Acorn configuration. If the command cannot find Acorn or reports an unexpected WordPress installation, change to the release or project directory that contains the site’s executable and configuration, then rerun wp acorn migrate:status before applying anything. In multisite or multi-environment setups, confirm that the selected WordPress context and database are the intended ones.

Production and non-interactive execution

Automated production deployments commonly use the non-interactive form:

wp acorn migrate --force

Use --force only in a controlled deployment step where the release, database, backup, and staging validation have already been checked. It is not a substitute for approval or a reason to skip the status review.

Reverse the latest migration batch

If the latest batch must be undone, run:

wp acorn migrate:rollback

Acorn calls each migration’s down() method for that batch. Rollback is therefore only as safe as the reversal code you wrote. A rollback that drops a table or column can destroy data written after the migration ran; restoring from the tested backup may be safer than invoking down().

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

Rollback is designed for a recent batch, not for arbitrarily removing an old migration while later migrations depend on it. Before using it in production, identify the batch in migrate:status, stop or protect code that depends on the soon-to-be-removed schema, and preserve logs. If the migration changed data as well as structure, verify exactly what down() can and cannot restore.

Verify the resulting WordPress schema

Acorn’s migration table tells you what Acorn executed; it does not prove that every table has the columns or indexes you intended. Compare the actual database with the expected schema after the command completes.

Inspect WordPress’s expected core SQL

WordPress documents wp_get_db_schema() as a way to retrieve SQL for creating core tables. Its scopes cover all tables, global tables, multisite-global tables, or blog tables. This is useful when diagnosing whether a difference belongs to WordPress core or to a custom Radicle migration.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

List tables visible to WordPress

WP-CLI can list tables registered to $wpdb:

wp db tables

The command supports all, blog, global, and multisite-global scopes. Use the appropriate scope for the installation, then check that a newly created custom table appears and that its name uses the site’s configured table prefix. These checks help catch a migration pointed at a different database or a multisite scope than the one you expected.

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

Check application behavior

  • Load the feature that reads or writes the changed table.
  • Exercise inserts, updates, and reads that cover new constraints and nullable fields.
  • Review PHP, WordPress, and database logs for SQL errors, permission failures, or unexpected table names.
  • Run the same status command after deployment to confirm no intended migration remains pending.

Run migrations during deployment

Running migrations as part of deployment makes schema changes repeatable. The essential sequence is: build and test the release, deploy the files, point the command at that release, run pending migrations, and then expose the new code to traffic according to the hosting platform’s release process.

Manual SSH execution

For a host where an operator performs the final step over SSH, use the site’s actual user, port, and release path. The pattern is:

ssh user@host -p port 'cd /path/to/site && wp acorn migrate --force'

Replace the example connection values with your environment’s real values; do not paste credentials into scripts or logs. The command changes into the WordPress directory before invoking WP-CLI, which prevents the shell from selecting another installation. Capture the SSH and WP-CLI output as part of the release record. If it fails, leave the release in the platform’s documented failed state, investigate the error, and do not repeatedly rerun a partially understood destructive operation.

Trellis deployment hook

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
working_dir: "{{ deploy_helper.new_release_path }}"
command: wp acorn migrate --force

Use the hook syntax required by the Trellis version and project role files; the important details are that the command runs after the new release is built and that {{ deploy_helper.new_release_path }} resolves to that release, not the previous one. Test the hook in staging first and keep its output in the deployment log.

Manual SSH versus an automated hook

Consideration Manual SSH Trellis or CI deployment hook
Repeatability Depends on the operator using the correct host, directory, and command each time. Encodes the command and release path in versioned deployment configuration.
Access control Requires an operator account with shell and database access; access can be tightly granted but is easy to use inconsistently. Uses the deployment service’s controlled credentials and can restrict who may start a release.
Logging Must be copied or retained from the SSH session. Normally appears with the rest of the release log, making audits and incident timelines simpler.
Failure handling The operator decides whether to stop, retry, or roll back after reading the output. The pipeline can fail the release and invoke the platform’s documented recovery process, but it still needs human review for data-destructive changes.
Staging coverage Requires a deliberate staging SSH run before production. The same hook can run in staging and production with environment-specific credentials and paths.

Neither approach removes the need for a backup, staging validation, or a migration that is compatible with the deployed code. Automation improves consistency; it does not make an unsafe migration safe.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Handle common failures

“Acorn” or the migration command is not found

Confirm that you are in the Radicle project directory and that the site’s WP-CLI installation loads Acorn. Check the command’s availability with a non-destructive status invocation. A deployment hook may also be running in the repository root rather than the release directory; correct its working directory before trying again.

The status shows no pending files

Check that the migration file was committed and deployed, that it is under database/migrations/, and that the shell is connected to the expected database. If the file was renamed or edited after it ran, do not assume Acorn will detect the change as a new migration; create a new corrective migration instead.

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

A migration fails because a table or column already exists

First inspect the database and migrate:status. The structure may have been created manually, by a different release, or by a migration recorded in another environment. Decide whether the migration should be made conditional, whether the existing structure matches the intended definition, or whether a separate corrective migration is needed. Do not delete the existing table merely to make the command pass.

Permissions or connection errors

Verify the database credentials and the operating-system user used by the release. Confirm that the deployment host can reach the database and that this environment’s configuration is loaded. Fix the access problem, then rerun the status command before applying pending work. A connection failure normally means no migration was recorded, but always verify the database state rather than relying on assumptions.

The application fails after a successful migration

Compare the deployed code with the migration’s actual schema, including column names, nullability, indexes, and table prefix. Review logs for queries generated by the new code. If the change is reversible and the data impact is understood, a latest-batch rollback may be appropriate; otherwise restore through the site’s tested recovery process and deploy a corrective migration. Avoid changing an already-applied migration file in place.

A rollback would remove important data

Stop and assess the data before running migrate:rollback. A down() method that drops a column or table cannot recover values written there. Preserve a backup or snapshot, determine whether the application can be taken offline, and choose restoration or a forward migration when that is safer.

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

Operational practices for teams

  • Review the SQL intent. Code review should cover the affected tables, indexes, constraints, estimated data volume, and the behavior of both lifecycle methods.
  • Commit schema and code together. The release that introduces a query should include the migration that makes that query valid, unless you are deliberately using a two-release compatibility plan.
  • Test on realistic data. A migration that succeeds on an empty database can fail or run for much longer on production-sized tables.
  • Record the batch. Keep command output and release identifiers so an incident can be mapped to the exact migration files that ran.
  • Prefer forward fixes after shared deployment. Once a migration has run in staging or production, a new migration preserves a reliable history across environments.
  • Separate destructive cleanup. Delay dropping old columns or tables until no supported release reads them and a recovery path has been validated.
  • Check multisite scope. Determine whether a custom table is network-wide or blog-specific, and verify it against the appropriate WordPress schema and WP-CLI table scope.
  • Keep environments convergent. The migration files in Git, not manual database edits, should be the authoritative sequence for each environment.

An end-to-end Radicle migration workflow

  1. Define the schema change. Write down the table, columns, keys, indexes, constraints, and whether the data is global or site-specific.
  2. Generate the file. Run wp acorn make:migration create_app_settings_table from the Radicle project.
  3. Implement both directions. Put the schema operation in up() and a tested reversal in down(). Keep the file focused on one change.
  4. Review and commit. Commit the migration with the application code that requires it; do not leave it only on a developer’s machine.
  5. Deploy to staging. Use the same release mechanism intended for production, then run wp acorn migrate:status.
  6. Apply and test. Run wp acorn migrate, inspect the output, verify tables with wp db tables where useful, and test the feature against realistic data.
  7. Prepare production recovery. Complete a tested backup through the site’s established process and confirm who can stop or recover the release.
  8. Deploy and migrate. Run the SSH command or the Trellis/CI hook from the new release path. Use --force only for that controlled non-interactive step.
  9. Verify after release. Re-run wp acorn migrate:status, exercise the affected request paths, and retain the logs.
  10. Respond deliberately if needed. For a safe latest-batch reversal, use wp acorn migrate:rollback; for destructive or data-changing failures, use the documented backup and recovery plan, then ship a corrective migration.

When you need a full WordPress migration instead

If the goal is to move posts, pages, media references, users, options, or an entire database between environments, use a site-migration workflow rather than an Acorn schema command. WP Engine’s WP Migrate documentation covers database exports, find-and-replace operations, and push/pull migrations for that class of work. You still may run Acorn migrations afterward if the destination application needs schema changes, but the two operations should be planned and verified separately.

For hosting assistance, managed WordPress plans may offer SSH access, staging environments, or database-management interfaces. Availability and exact features vary by current hosting program, so verify them for the site and region before designing a deployment process around them.

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 quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver 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.