=== BlogPort Migrator for Blogger ===
Contributors: ravindrasaran
Tags: blogger to wordpress, blogspot migrator, 301 redirect, search replace, migration
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A reliable feed-based migration tool to import posts, pages, images, and slug preservation from Blogger to WordPress with SEO redirect support.

== Description ==

BlogPort Migrator for Blogger is designed to help users migrate content from Blogger (Blogspot) to WordPress using feed-based blazing-fast AJAX background processing.

Recent Blogger exports provide Atom feeds instead of traditional XML backups, which may result in missing categories, publishing dates, or metadata when using standard import tools.

This plugin seamlessly migrates posts, pages, and comments, downloads Blogger-hosted images to your WordPress Media Library, maps Alt tags, image titles, captions, and allows manual syncing of legacy Blogger pageviews.

== Why Choose BlogPort Migrator for Blogger? ==

= 1. Intelligent Importer =
Import posts, pages, and comments using Blogger Feed URLs. The importer features a robust AJAX background engine that prevents server timeouts and attempts to preserve:

* **Pre-Migration Scanner:** Get a detailed summary (estimated time, total posts, media) before starting.
* **Anti-Timeout Technology:** Imports content smoothly one-by-one to prevent 504 Gateway Timeouts, capable of handling 5,000+ posts effortlessly.
* **Live Pause/Resume:** Safely pause and resume long migrations at any time.
* **Comments Sync:** Securely fetches and maps original Blogger comments to your WordPress posts.
* Original publishing dates (not just modified dates) and slug structure.
* Categories (labels where available in feed) with the option to import as Tags.
* Image metadata (ALT text, Title, and Captions) with Smart SEO Fallback.
* **Image Date Sync:** Automatically organizes your Media Library folders based on the original Blogger post date (e.g., /uploads/2015/06/).

= 2. Danger Zone (System Cleanup) =
If a migration didn't go as planned, the built-in Danger Zone tool allows you to safely and cleanly erase ONLY the posts, pages, and media files imported by this plugin with a single click. Your original WordPress database remains 100% safe.

= 3. Deep Fix Tool =
If content was previously migrated using another method, the Deep Fix tool can scan and attempt to restore:

* Missing categories, image metadata (ALT text, Title, and Captions).
* Broken gallery images by sideloading them to your server and fixing gallery links.
* **Live Pause/Resume:** Run massive deep scans in the background with pause/resume controls.

= 4. View Manager =
A utility to manually sync legacy Blogger traffic statistics with your new WordPress posts (with pagination support for large sites).

= 5. SEO Redirect Support =
Helps maintain search engine visibility by supporting proper 301 redirects. It efficiently redirects old Blogger URLs (e.g., /year/month/post-title.html including Mobile `?m=1` links) to corresponding WordPress permalinks without slowing down your site.

= 6. Smart Search & Replace Utility =
A tool to safely update old domain URLs across specific WordPress database tables after migration. It automatically formats standard domains into secure HTTPS links to prevent database corruption.

**Disclaimer:** This plugin is an independent tool and is not affiliated with, sponsored by, or endorsed by Google or Blogger. "Blogger" is a trademark of Google LLC.

== Installation ==

= Important Pre-Migration Steps =
Before starting the migration, please ensure the following settings are correct:
1. **Blogger Setup:** Go to your Blogger.com dashboard → Settings → Site feed → Allow blog feed → Set to "**Full**".
2. **WordPress Setup:** Go to your WordPress Dashboard → Settings → Permalinks → Select "**Post name**" and click Save Changes.

= Automatic Installation =

1. Go to **Plugins** → **Add New** in your WordPress dashboard.
2. Search for "**BlogPort Migrator for Blogger**".
3. Click **Install Now** and then **Activate**.
4. Go to **Blogger Migrator** in your admin sidebar.
5. Start with the **Intelligent Importer** or **Deep Fix** as needed.
6. Enter your **Blogger Feed URL** to begin.

= Manual Installation =

1. Download the plugin ZIP file from WordPress.org.
2. Go to **Plugins** → **Add New** → **Upload Plugin**.
3. Choose the ZIP file and click **Install Now**.
4. After installation, click **Activate**.
5. Go to **Blogger Migrator** in your admin sidebar.
6. Start with the **Intelligent Importer** or **Deep Fix** as needed.
7. Enter your **Blogger Feed URL** to begin.

= Via FTP/cPanel =

1. Upload the `blogport-migrator-for-blogger` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Blogger Migrator** in your admin sidebar.
4. Start with the **Intelligent Importer** or **Deep Fix** as needed.
5. Enter your **Blogger Feed URL** to begin.

== Frequently Asked Questions ==

= Does it import images to my server? =
Yes. The plugin fetches images from Blogger servers and saves them into your WordPress Media Library. The first detected image can be assigned as the Featured Image.

= Will it fix my Media Library? =
Yes! Use the **Deep Fix** tool. It will scan your posts, download external Blogger images to your server, and even fix their upload dates to match the post date.

= Will my SEO rankings stay safe? =
When properly configured, the 301 redirect feature helps maintain URL continuity. The redirect module uses permanent 301 redirects to map old Blogger .html URLs to corresponding WordPress permalinks.

= What if I make a mistake during import? =
No worries! You can use our new **Danger Zone (System Cleanup)** tool located at the bottom of the Importer tab to safely delete everything imported by the plugin and start fresh.

= Will it preserve original publishing dates? =
Yes. The plugin uses the `published` date from the Blogger feed where available.

= Can I fix an old migration done by another plugin? =
Yes. Use the Deep Fix tool to scan existing posts and restore missing image data and metadata where possible.

= Is this safe for large blogs? =
Absolutely. Our advanced AJAX background engine uses smart chunking technology to process posts one-by-one, bypassing server limits and preventing 504 Gateway Timeouts.

== Screenshots ==

1. Main Dashboard - Modern SaaS-style UI with Advanced Customization Options.
2. Pre-Migration Scanner - Summary card showing estimated time, posts, and media count.
3. Live Execution Terminal - Real-time progress bar with Smart Pagination Trackers.
4. Danger Zone - Safely reset and clean up your migration with a single click.
5. Deep Fix Engine - Background scanner repairing broken images and metadata.
6. View Manager - Manually sync traffic statistics with pagination support.
7. SEO Redirects - Enable 301 redirection to keep search rankings safe.
8. Search & Replace - Securely auto-format and update database URLs.

== Changelog ==

= 1.2.0 =
* **Major Update: The "Bulletproof Engine & Cleanup" Release**
* **[New Feature]** Danger Zone (System Cleanup): Added a highly requested 1-click safe reset tool. Easily erase only the posts and media imported by this plugin to start fresh if you make a mistake.
* **[Performance]** Anti-Timeout Chunking System: Upgraded the importer to a 1-by-1 ultra-smooth processing engine. 100% crash-proof and completely bypasses 504 Gateway Timeouts on strict servers like NGINX and Cloudflare.
* **[New Feature]** Advanced Settings Toggle: Added beginner-friendly options to import Labels as Tags, skip Featured Images, and disable auto-generated Alt text.
* **[Enhancement]** Smart URL Auto-Format: The Search & Replace tool now automatically detects and secures plain text domains (e.g., `domain.com`) into proper `https://` URLs to prevent user errors and database corruption.
* **[Enhancement]** Live Mathematical Page Tracker: The terminal now perfectly calculates and highlights pagination progress (e.g., `Processing page 2/4`) for ultimate transparency.
* **[Code Quality]** 100% WPCS Compliance: Refactored and polished the entire codebase to meet the highest WordPress.org coding and security standards. 

= 1.1.0 =
* **Major Update: The Performance & UI Enhancement Release**
* **[New Feature]** Added Live Pause, Resume, and Stop controls for both Intelligent Importer and Deep Fix engines. You can now pause long migrations anytime!
* **[New Feature]** Blogger Comments Sync! The importer now securely fetches and maps original Blogger comments to your WordPress posts.
* **[New Feature]** Pre-Migration Scanner: Added a beautiful SaaS-style summary card that calculates estimated time, total posts, images, and labels before starting the actual migration.
* **[New Feature]** Live Progress Bar added to the execution terminal for real-time visual feedback.
* **[New Feature]** Smart SEO Fallback for Media: Automatically generates image `Alt` and `Title` tags using the post title and counter if original metadata is missing.
* **[Performance]** Converted synchronous form-based processing to a blazing-fast AJAX background architecture for both Importer and Deep Fix engines. No more browser timeouts!
* **[Performance]** Massive speed boost in SEO Redirects. The redirection engine now only triggers on `is_404()` pages instead of every page load, saving immense server resources.
* **[Performance]** Replaced `get_page_by_path()` with an optimized, ID-only `get_posts()` query in the SEO Redirector.
* **[Enhancement]** The Ultimate Image URL Normalization: Better handling for newer Blogger image URLs, automatically downgrading scaled images (e.g., /s1600/, /w...-h.../) to their maximum original resolution (/s0/).
* **[Enhancement]** True MIME Type Detection: The Media engine now reads physical file magic bytes (`@getimagesize` / `finfo`) instead of relying just on extensions. Fixes major issues with WebP, PNG, and SVG imports!
* **[Enhancement]** Sideload Bypass for complex formats: Bypasses standard WP limits for `webp`, `png`, `gif`, and `svg` formats to ensure guaranteed imports into the media library.
* **[Enhancement]** Advanced Caption Extraction: The engine now perfectly extracts image captions from both table-based and div-based Blogger `tr-caption-container` structures.
* **[Enhancement]** Pagination added to the Views Manager. Now perfectly handles thousands of posts without crashing, displaying 20 posts per page.
* **[Enhancement]** Added Blogger Mobile URL (`?m=1`) support in the SEO Redirect module to ensure mobile rankings are also perfectly preserved.
* **[UI/UX]** Complete UI overhaul! Added premium Inter & Fira Code fonts, glowing pulse badges, shimmer button effects, and a modern Dashboard layout.
* **[Security]** Added strict WordPress Nonce (`check_ajax_referer`) validations for all AJAX calls to prevent unauthorized access.
* **[Security]** Safe DB Initialization: Refactored plugin initialization to fire safely on the `plugins_loaded` hook.
* **[Security]** Added `$wpdb->prefix` strict matching in the Search & Replace tool to prevent accidental modifications to non-WordPress tables.
* **[Security]** Added strict integer sanitization (`absint()`) in Views Manager to prevent invalid or negative inputs.
* **[Warning Added]** Added an important UI warning in the Search & Replace tool regarding serialized PHP data corruption.

= 1.0.0 =
* Initial stable release.  
* Added Feed-based Importer for posts and pages.
* Added Media Gallery save with ALT/Title/Caption sync.
* Added Original Image Upload Date preservation. 
* Added Deep Fix tool for content repair.  
* Added SEO 301 Redirection.  
* Added View Manager.
* Added Database Search & Replace.

== Upgrade Notice ==

= 1.2.0 =
The biggest stability update yet! Features a new anti-timeout processing engine for massive blogs, a safe "Danger Zone" cleanup tool to erase mistakes, and an auto-securing Search & Replace utility. Upgrade now for a 100% crash-proof experience!

= 1.1.0 =
Major performance and UI update! It is highly recommended to upgrade for faster AJAX background migrations, Comments Sync support, and a completely new live Pause/Resume feature.

= 1.0.0 =
Initial stable release for Blogger to WordPress migrations.

== Additional Info ==

= Support =
For any technical queries, bug reports, or feature requests, please join our official support channel:

* **Telegram Support:** [Join Here](https://t.me/bloggermigrator)
* **Official Website:** [Bishnoi.co.in](https://www.bishnoi.co.in)

= Privacy =
This plugin does not collect or store any personal data. All import processing happens on your server.

== Credits ==

* **Developed by:** [Ravindra Saran](https://www.bishnoi.co.in)
* **Built with ❤️ for the Blogger Community.**