=== 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.17
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.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.
* Persian translation refinements (سایترنت, وردپرس, دانلود, and more).
* 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.
