=== Ethereal Link Replacer ===
Contributors: manuelzela30
Tags: search replace, migration, urls, links, database
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Safely search and replace links, URLs, or any text across your WordPress database — including serialized data — with a dry-run preview and CSV log.

== Description ==

Ethereal Link Replacer is a lightweight, focused tool for changing links, URLs, and other text throughout your WordPress database. It is built for the common migration jobs: moving from HTTP to HTTPS, switching domains, or cleaning up an old CDN or media URL.

Unlike a plain SQL find-and-replace, this plugin correctly handles **serialized data**. It unpacks serialized arrays and objects (the format many themes and plugins use to store settings and page-builder content), replaces the text inside, and repacks it so your data stays valid.

= Key features =

* Search and replace across posts, post meta, options, terms, term meta, and comments — you choose which.
* Serialized-data aware, so page-builder and theme option data is not corrupted.
* **Dry-run mode** that previews every change before anything is written.
* Optional regular-expression matching (the unsafe `/e` modifier is blocked).
* Batched processing to keep memory use low on large sites.
* A downloadable CSV log of every change.
* A WP-CLI command for scripted or large migrations.
* No tracking, no external requests, no ads, no upsells.

= Who makes this =

Ethereal Link Replacer is developed by **Manuel Zela** at [Ethereal Web Solution](https://etherealwebsolution.com/). Plugin home page: [etherealwebsolution.com/ethereal-link-replacer](https://etherealwebsolution.com/ethereal-link-replacer/).

== Important: back up first ==

This plugin edits your live database. Changes made in a real (non-dry-run) pass **cannot be undone from within the plugin**. Always take a complete database backup before running a live replacement, and preview with a dry run first.

== Installation ==

1. Upload the `ethereal-link-replacer` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **Link Replacer** in the admin menu.
4. Enter your search and replacement values, choose the tables, run a **dry run**, then run for real once you are satisfied.

== Frequently Asked Questions ==

= Does it handle serialized data? =

Yes. Serialized arrays and objects are unpacked, edited, and repacked so string lengths stay correct and the data remains valid.

= Can I undo a replacement? =

Not from the plugin. Because it writes directly to the database, you should always keep a backup and preview with a dry run before running for real.

= Can I use it from the command line? =

Yes. Example:

`wp ethlr replace --search="https://old.com" --replace="https://new.com" --dry`

Remove `--dry` to apply the changes. Add `--regex` to treat the search value as a regular expression.

= Will it change my site URL? =

The `siteurl` and `home` options are skipped on purpose to avoid locking you out. Change those from **Settings → General**.

== Screenshots ==

1. The admin screen with search, replacement, table selection, and dry-run controls.
2. The run log showing every changed row.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
