=== M Media Instant Sitemap ===
Contributors: mmediausa, jeffmutschler
Tags: sitemap, xml, seo, ajax, admin menu
Requires at least: 5.0
Tested up to: 6.8
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

One-click left-admin page to instantly create a static sitemap.xml via AJAX, with automatic backups and live URL count.

== Description ==

**Instant Sitemap** is a **lightweight, zero-configuration plugin** that gives you a single, powerful feature:  
**A one-click “Generate Sitemap” button in your WordPress admin** (left menu → **Instant Sitemap**).

When clicked, it:
- Instantly generates a **static `sitemap.xml`** file in your site's root.
- Backs up the previous sitemap with a **timestamped filename** (e.g., `sitemap-20250718-143500.xml`).
- Counts URLs (before and after) and shows a **live AJAX notice** with the difference.
- Works with all **public post types** (Posts, Pages, CPTs).
- Loads scripts **only on the plugin page** for a lean, clean admin.

No settings. No bloat. Just click and done.

### **Why This Plugin?**
Unlike bulky SEO plugins (Yoast, AIOSEO, RankMath), Instant Sitemap **does only one thing – and does it fast.**  
It’s perfect for developers, minimalists, or anyone who just wants a **quick, static sitemap** for Google & Bing.

---

== Installation ==

1. Upload the `instant-sitemap` folder to `/wp-content/plugins/` (or use the WP Admin “Upload Plugin” feature).
2. Activate the plugin via **Plugins → Installed Plugins**.
3. In the left admin menu, click **Instant Sitemap**.
4. Hit **Generate Sitemap** to instantly create or refresh `sitemap.xml`.

---

== Frequently Asked Questions ==

= Where is my sitemap? =  
It’s located in your WordPress root directory as `sitemap.xml`. A backup of the old file is saved as `sitemap-YYYYMMDD-HHMMSS.xml`.

= Does it include pages, posts, and custom post types? =  
**Yes!** All public post types are included by default.

= Does it automatically ping Google or Bing? =  
Not yet, but that feature is on the roadmap.

= Can I customize changefreq or priority? =  
Currently, all URLs are set to `weekly` and `0.8`. A filter hook will be added for customization in a future update.

= Will it work with multisite? =  
It currently generates a sitemap per-site. Multisite network-wide generation may be added later.

= What happened to the admin bar button? =  
As of **v1.4**, the UI lives on a dedicated **Instant Sitemap** admin page in the left menu for better UX and fewer accidental clicks. (Advanced users can re-add an admin-bar button with a small snippet if they prefer.)

= Can I put it under Tools instead of a top-level menu? =  
Yes; developers can swap to a Tools submenu with:
`add_submenu_page('tools.php','Instant Sitemap','Instant Sitemap','manage_options','instant-sitemap','instant_sitemap_render_admin_page');`

---

== Screenshots ==

1. Upload the plugin from Plugins → Add New → Upload Plugin.
2. Select “mmedia-instant-sitemap.zip” and click **Install Now**.
3. Activate the plugin and open **Instant Sitemap** settings.
4. Click **Generate Sitemap** to create your complete sitemap.
5. After generation, the results screen shows: total URLs, number of updated URLs, and previous vs new counts.
6. When you add or remove content and generate a new sitemap, the interface updates to show Previous URLs, New URLs, Updated URLs, and the Difference.
7. On your server, you’ll see the new **sitemap.xml** plus archived versions automatically renamed with a timestamp (sitemap-YYYYMMDD-HHMMSS.xml).

---

== Changelog ==

= 1.0.0 =
* Initial release with one-click static sitemap generation.
* AJAX-powered button (no page reload).
* Live success/error notices.
* Backup of old sitemap with timestamps.
* URL count comparison before and after.

---

== Credits ==
Developed by [M Media] (https://www.mmediausa.com/instant-sitemap/).
