=== Siternet Website Migration ===
Contributors: siternet
Tags: migration, backup, export, import, clone
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.29
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Export a full site (files + database) to a .zip backup and restore it with drag-and-drop import.

== Description ==

Siternet Website Migration helps you move a full WordPress site between hosts.

= What it does =

* Export themes, plugins, uploads, and the database into a standard .zip backup
* Import by drag-and-drop (uploads are chunked so typical PHP upload limits are less of a problem)
* Rewrite links and media URLs to the destination domain after import
* Keep a list of backups on the host for restore, download, or delete

= Good to know =

* Backups created by this plugin use its own .zip format
* Multisite is not supported in this version
* Import/restore replaces the current site files and database — use carefully

Plugin URI: https://www.siternet.com/themes-plugins/

== Installation ==

1. Upload the plugin folder to `wp-content/plugins`, or install from the WordPress admin
2. Activate **Siternet Website Migration**
3. Open **Website Backup** in the WordPress admin menu

== Frequently Asked Questions ==

= Does this work on shared hosting? =

Yes, as long as the PHP ZipArchive extension is available and the site can write to `wp-content`.

= Will import replace my current site? =

Yes. Import and restore replace files and the database on the destination site. Create a backup first if you need a rollback.

= Are backups compatible with other migration plugins? =

No. Use a .zip exported by this plugin.

= Is multisite supported? =

Not in this version.

== Screenshots ==

1. Import — drag-and-drop a .zip backup; URLs rewrite to the destination domain.
2. Export — create a full-site .zip backup (files + database) on the host.
3. Backups — restore, download, or delete host-side backup archives.


== Changelog ==

= 1.0.29 =
* Fix WordPress.org theme/plugin directory broken after import (do not rewrite api.wordpress.org URLs).

= 1.0.28 =
* Preserve all imported user passwords and profile data (no longer overwrite the admin password after migrate).
* Fix Log Out and other login links still pointing at the old domain (filter logout_url / lostpassword_url / register_url / set_url_scheme).

= 1.0.27 =
* Fix Add Plugin / Add Theme and other admin links still pointing at the old domain: always rewrite site/home/admin URLs to the current browser host and permanently correct home/siteurl (and wp-config) on admin load when they disagree.

= 1.0.26 =
* Fix admin/plugin/theme install redirects to the old domain after migration by matching All-in-One WP Migration: capture destination home/siteurl before DB import, force-write them with update_option after restore, deactivate SSL/hide-login plugins that redirect away, harden wp-config host rewrites, and keep content/plugins URL filters on the destination host.

= 1.0.25 =
* Make the review banner yellow styling reliable across hosts (inline critical CSS + stronger selectors so it is not lost to cache or conflicts).

= 1.0.24 =
* After import/restore, show an Open Permalinks button and tip to click Save Changes (helps fix 404s after migration).

= 1.0.23 =
* Add WordPress.org star-rating / review prompts (Document tab, footer link, and a dismissible banner after successful export or import).

= 1.0.22 =
* Speed up export/import with larger batches, longer per-request work time, and adaptive pacing (faster on healthy hosts, smaller batches after timeouts).
* Stop running heavy URL repair sweeps during migration AJAX requests (that was slowing every step).

= 1.0.21 =
* Fix redirects to the old domain after import (login, plugin install, admin links) by pinning the destination URL and overriding home/siteurl the same way major migration tools do.
* Remove the View site button from the post-import success panel (it could still open the old domain).

= 1.0.20 =
* Show a clear success panel after import/restore with Open dashboard, View site, and Refresh this page buttons instead of auto-redirecting silently.

= 1.0.19 =
* Fix wp-login.php and wp-admin redirecting to the old domain when WP_HOME or the database still reference the source host.
* Prefer the current request host for URL repair after migration instead of trusting imported wp-config constants.

= 1.0.18 =
* Fix permalink structure being corrupted to random hash strings after import (e.g. `/%postname%/` becoming `/{hash}postname{hash}/`).
* Store permalink settings in the export manifest and restore them after all URL updates finish.
* Repair percent placeholders in permalink options and skip URL replacement on permalink tag strings.

= 1.0.17 =
* Keep the operator logged in after restore: refresh auth cookies during import and issue a one-time secure dashboard login link when import finishes.
* Redirect to wp-admin automatically after import/restore instead of requiring a manual login.

= 1.0.16 =
* Fix fatal infinite loop in login_url filter that could crash PHP and make wp-login.php return 502.
* Sweep posts and postmeta for leftover old-domain image and content URLs after import.
* Remove absolute upload_url_path values that point at the old site.

= 1.0.15 =
* Fix post-login redirects when the login form still submits an old redirect_to URL from the imported site.
* Sanitize redirect_to on login POST before WordPress handles authentication.
* Clear imported per-user SSL preferences that can break local HTTP logins.

= 1.0.14 =
* Fix login redirects that still pointed at the imported (source) domain via redirect_to or canonical redirects.
* Remember source hostnames from imports so redirects can be rewritten after URL repair completes.
* Load migration hooks early enough for wp-login.php on the first request.

= 1.0.13 =
* Remove must-use plugin and runtime redirect hooks that caused white screens and login loops.
* Write WP_HOME/WP_SITEURL to wp-config.php at the start of import (before the database is restored).
* Fix database siteurl/home immediately after SQL import completes.
* Simpler, reliable URL repair using wp-config constants + database updates only.

= 1.0.11 =
* Self-contained must-use plugin overrides siteurl/home before any other plugin loads.
* Fix URLs in the database immediately when the SQL import finishes (before URL replace step).
* Auto-detect host mismatch and repair on every request without requiring a re-import.
* Block redirects to the old domain and disable SSL redirect plugins during repair.

= 1.0.10 =
* Install a temporary must-use plugin after import to override siteurl/home before other plugins load.
* Block redirects to the old domain from SSL plugins and .htaccess rules during URL repair.
* Auto-detect when the database still points at the old domain but the request uses a different host.
* Always derive the destination URL from the current request during import (never from the imported database).

= 1.0.9 =
* Fix wp-login.php redirecting to the old domain while the front-end already uses the new URL.
* Re-apply destination siteurl/home on the first requests after import (login, admin, plugins loaded).

= 1.0.8 =
* Fix login and front-end redirects to the old domain after import.
* Strip SSL and external redirect rules from imported .htaccess (Really Simple SSL, etc.).
* Force wp-config.php WP_HOME/WP_SITEURL to the destination URL; remove FORCE_SSL_ADMIN on HTTP sites.
* Disable common SSL redirect plugin options that send traffic back to the source domain.

= 1.0.7 =
* Stronger post-import URL replacement across the database, options, usermeta, themes, and uploads.
* Read siteurl/home from the imported database before replacing URLs (http, https, www, trailing slash).
* Update or add WP_HOME and WP_SITEURL in wp-config.php after import.
* Preserve permalink structure (plain/post name/custom) from the source site after import.
* Restore source .htaccess with an adjusted RewriteBase for the destination path.
* Rebuild rewrite rules on the next admin load so custom post types keep working.

= 1.0.6 =
* Fix storage writability probe warning when multiple export/import requests run at once.
* Use a unique temporary probe file and safer read/cleanup during uploads folder checks.

= 1.0.5 =
* Add translations: Persian, Arabic, French, German (DE/AT), Italian, Spanish, Russian, Chinese, Japanese, and Norwegian (.pot, .po, .mo).
* RTL admin layout for Persian and Arabic with Vazirmatn and Cairo fonts.
* Fix RTL hero, tabs, and logo placement in Persian and Arabic.
* Faster export: larger batches, longer time budget per request, and zip retry on timeout.
* Plugin Check: remove manual textdomain load; fix font enqueue version parameters.

= 1.0.4 =
* Fix post 404s after import by regenerating permalinks instead of copying source .htaccess.
* Preserve separate home and siteurl URLs on subdirectory installs.
* Fix theme styles and links being reverted after URL search-replace.
* Improve URL replacement for escaped JSON and HTML-encoded links.

= 1.0.3 =
* Fix import leaving only this plugin active after restore.
* Improve export reliability on hosts with gateway timeouts: smaller archive batches, step locking, and resume after interruption.
* Rename progress label "Dumping database" to "Exporting database".

= 1.0.2 =
* Refresh plugin directory icons.

= 1.0.1 =
* Directory assets: PNG icons and refreshed screenshots.

= 1.0.0 =
* Initial release: export, chunked import, URL rewrite, and host-side backup restore.
