A standards-compliant XML sitemap is a simple text file that lists every page on your WordPress site, helping search engines like Google and Bing discover, crawl, and index your content more efficiently. Unlike HTML sitemaps designed for human visitors, an XML sitemap is machine-readable and includes metadata such as the last update time, how often a page changes, and its relative importance. While WordPress plugins like Yoast SEO or Rank Math can generate sitemaps automatically, they often add unnecessary overhead, slow down your site, and include pages you may not want indexed. For site owners who prefer a lightweight, manual approach, the XML Sitemap Generator tool provides a fast, browser-based solution—no crawling, no uploads, and no plugin bloat.

If you’ve ever struggled with slow plugin updates, unwanted URLs in your sitemap, or the hassle of configuring yet another WordPress extension, this method gives you full control. You simply paste your page URLs, adjust optional metadata, and download a ready-to-use sitemap.xml file. This approach is ideal for small to medium-sized WordPress sites, static pages, or any project where you want to avoid plugin dependencies. It also works seamlessly with custom post types, WooCommerce products, or any other content you’ve added to your site. Once generated, the sitemap can be uploaded to your site’s root directory or submitted directly to Google Search Console for faster indexing.

how to create xml sitemap in wordpress
how to create xml sitemap in wordpress

Why Use a Manual XML Sitemap for WordPress?

WordPress plugins like Yoast SEO, All in One SEO, or Google XML Sitemaps are popular for automatically generating sitemaps, but they come with trade-offs. Plugins add database queries, PHP processing, and often include pages you don’t want indexed—such as admin pages, tag archives, or low-value content. They also require regular updates, which can break compatibility with other plugins or themes. For site owners who prioritize speed, security, and simplicity, a manual approach using the XML Sitemap Generator tool offers several advantages:

  • No Plugin Overhead: Eliminate unnecessary PHP execution, database calls, and potential conflicts with other plugins.
  • Full Control Over URLs: Include only the pages you want indexed, such as posts, pages, and custom post types, while excluding low-value or duplicate content.
  • Faster Indexing: A clean, manually curated sitemap helps search engines prioritize your most important pages without wading through irrelevant URLs.
  • No Automatic Updates: Avoid the risk of a plugin update breaking your sitemap or introducing unwanted changes.
  • Works with Any Hosting: Whether you’re on shared hosting, a VPS, or a static site generator, the tool works entirely in your browser—no server-side dependencies.

This method is especially useful for small business sites, blogs with a limited number of pages, or developers who want to avoid plugin bloat. It’s also a great option if you’ve disabled plugins for performance reasons or if you’re using a headless WordPress setup where traditional plugins aren’t an option.

How to Prepare Your WordPress URLs for the Sitemap

Before generating your XML sitemap, you’ll need a list of all the pages you want to include. For WordPress sites, this typically includes posts, pages, and custom post types like products or portfolio items. Here’s how to gather your URLs efficiently:

  1. Export URLs from WordPress:
    • Go to your WordPress dashboard and navigate to Tools > Export.
    • Select All content and download the XML file.
    • Open the file in a text editor or use a tool like Sitemap URL Extractor to extract the URLs into a clean list.
  2. Use Google Search Console:
    • If your site is already verified in Google Search Console, go to Index > Coverage to see a list of indexed pages.
    • Export the list and filter out any URLs you don’t want in your sitemap.
  3. Manually Curate URLs:
    • For smaller sites, you can manually list your pages by visiting each one and copying the URL.
    • Exclude low-value pages like login pages, admin areas, or duplicate content (e.g., paginated archives).
  4. Check for HTTPS and Absolute URLs:
    • Ensure every URL starts with https:// (or http:// if your site doesn’t use SSL).
    • Remove any relative paths (e.g., /about/) and replace them with absolute URLs (e.g., https://yoursite.com/about/).
    • Use the same domain and protocol for all URLs—mixing http and https can cause issues with search engines.

Once you have your list, you’re ready to generate the sitemap. If you’re unsure which pages to include, focus on your most important content—such as your homepage, key product or service pages, and high-traffic blog posts. Exclude pages that don’t provide value to search engines, like thank-you pages, login screens, or duplicate content.

Generate Your XML Sitemap in 3 Steps

The XML Sitemap Generator tool simplifies the process of creating a standards-compliant sitemap. Here’s how to use it:

  1. Paste Your URLs:
    • Open the XML Sitemap Generator tool in your browser.
    • Paste your list of absolute URLs into the input field, with one URL per line. Example:
      https://yoursite.com/
      https://yoursite.com/about/
      https://yoursite.com/services/
      https://yoursite.com/blog/
    • Ensure all URLs use the same protocol (HTTP or HTTPS) and domain. The tool will reject URLs with mismatched hosts or ports.
  2. Set Optional Metadata (Recommended):
    • The tool allows you to add three optional fields for each URL: lastmod (last modified date), changefreq (how often the page changes), and priority (relative importance of the page).
    • For lastmod, use the format YYYY-MM-DD (e.g., 2024-05-15). If you leave this blank, the tool will omit the field.
    • For changefreq, choose from the following values: always, hourly, daily, weekly, monthly, yearly, or never. Use this field truthfully—don’t mark a static page as daily if it never changes.
    • For priority, use a decimal value between 0.0 and 1.0. The homepage is typically set to 1.0, while less important pages might use 0.5 or lower. Avoid assigning high priority to every page, as this dilutes the signal.
    • If you’re unsure about these fields, you can leave them blank—the tool will generate a basic <loc>-only sitemap, which is still valid.
  3. Generate and Download Your Sitemap:
    • Click the Generate button. The tool will validate your URLs and create a standards-compliant XML sitemap.
    • Review the output to ensure all URLs are included and the metadata is correct. The tool will also display a count of URLs and any warnings (e.g., duplicate URLs or invalid formats).
    • Click Download sitemap.xml to save the file to your computer.

That’s it! Your sitemap is now ready to be uploaded to your WordPress site. The entire process takes less than a minute, even for sites with hundreds of pages.

Upload and Submit Your Sitemap to WordPress

Once you’ve generated your sitemap.xml file, the next step is to upload it to your WordPress site and submit it to search engines. Here’s how to do it:

Upload the Sitemap to Your WordPress Root Directory

You can upload the sitemap.xml file to your site’s root directory using one of these methods:

  1. FTP or SFTP:
    • Connect to your site using an FTP client like FileZilla or Cyberduck.
    • Navigate to the root directory of your WordPress installation (usually public_html or htdocs).
    • Upload the sitemap.xml file to this directory.
  2. cPanel File Manager:
    • Log in to your hosting account’s cPanel.
    • Open File Manager and navigate to the root directory of your WordPress site.
    • Click Upload and select the sitemap.xml file from your computer.
  3. WordPress Plugin (Temporary):
    • If you don’t have FTP or cPanel access, you can use a plugin like File Manager to upload the file directly from your WordPress dashboard.
    • Install and activate the plugin, then navigate to File Manager > Root Directory and upload the file.
    • Once uploaded, you can deactivate and delete the plugin to avoid unnecessary overhead.

After uploading, verify that the sitemap is accessible by visiting https://yoursite.com/sitemap.xml in your browser. You should see the XML file with all your URLs listed.

Submit Your Sitemap to Google Search Console

Submitting your sitemap to Google Search Console helps ensure your pages are discovered and indexed quickly. Here’s how to do it:

  1. Verify Your Site:
    • Go to Google Search Console and sign in with your Google account.
    • If you haven’t already verified your site, click Add Property and follow the verification steps (e.g., uploading an HTML file or adding a DNS record).
  2. Submit the Sitemap:
    • In Google Search Console, select your property (website).
    • In the left sidebar, click Sitemaps under the Index section.
    • In the Add a new sitemap field, enter sitemap.xml (or the full URL if your sitemap is in a subdirectory).
    • Click Submit.
  3. Check for Errors:
    • After submission, Google will process your sitemap and display its status (e.g., Success, Has errors, or Couldn’t fetch).
    • If there are errors, click on the sitemap to see details and fix any issues (e.g., invalid URLs or formatting problems).

Google will now use your sitemap to discover and crawl your pages more efficiently. You can resubmit the sitemap anytime you update it with new URLs.

Submit Your Sitemap to Bing Webmaster Tools

While Google dominates search, Bing still drives significant traffic for many sites. Here’s how to submit your sitemap to Bing:

  1. Verify Your Site:
    • Go to Bing Webmaster Tools and sign in with your Microsoft account.
    • Click Add a Site and enter your site’s URL.
    • Follow the verification steps (e.g., uploading an XML file or adding a meta tag to your site).
  2. Submit the Sitemap:
    • Once verified, select your site from the dashboard.
    • In the left sidebar, click Sitemaps under the Configure My Site section.
    • Click Submit a Sitemap and enter the full URL of your sitemap (e.g., https://yoursite.com/sitemap.xml).
    • Click Submit.
  3. Monitor for Errors:
    • Bing will process your sitemap and display its status. If there are errors, you’ll see details on how to fix them.

Submitting your sitemap to both Google and Bing ensures maximum visibility for your WordPress site. You can also submit your sitemap to other search engines like Yandex or Baidu if they’re relevant to your audience.

Best Practices for Maintaining Your XML Sitemap

Creating an XML sitemap is just the first step—keeping it up to date ensures search engines always have the latest information about your site. Here are some best practices to follow:

Best Practice Why It Matters How to Implement
Update Your Sitemap Regularly Search engines rely on your sitemap to discover new or updated content. An outdated sitemap can delay indexing. Regenerate and re-upload your sitemap whenever you add, remove, or update pages. For dynamic sites, consider automating this process (e.g., using a cron job or a lightweight script).
Exclude Low-Value Pages Including irrelevant pages (e.g., login screens, duplicate content) can waste crawl budget and dilute the importance of your key pages. Only include pages that provide value to users and search engines. Exclude admin pages, thank-you pages, and low-quality content.
Use Accurate Metadata Fields like lastmod, changefreq, and priority help search engines prioritize crawling. Inaccurate metadata can mislead crawlers. Set lastmod to the actual last modified date of the page. Use changefreq and priority truthfully—don’t mark static pages as frequently changing.
Keep the Sitemap Under 50,000 URLs Google limits sitemaps to 50,000 URLs per file. Larger sites may need a sitemap index. If your site has more than 50,000 URLs, split them into multiple sitemaps and use a sitemap index file to reference them.
Validate Your Sitemap Invalid XML or formatting errors can prevent search engines from processing your sitemap. Use the XML Sitemap Generator tool to validate your URLs before generating the sitemap. You can also use Google Search Console’s sitemap report to check for errors.
Submit Updates to Search Engines Search engines may not check your sitemap frequently. Submitting updates ensures they’re processed quickly. After updating your sitemap, resubmit it via Google Search Console and Bing Webmaster Tools.

By following these best practices, you’ll ensure your XML sitemap remains an effective tool for improving your WordPress site’s SEO. For larger sites or those with frequent updates, consider automating the process using a script or a lightweight plugin (e.g., Bulk URL Generator to create URL lists dynamically).

Troubleshooting Common XML Sitemap Issues

Even with a straightforward tool like the XML Sitemap Generator, you might encounter issues when creating or submitting your sitemap. Here’s how to troubleshoot some of the most common problems:

1. Sitemap Not Found (404 Error)

Cause: The sitemap.xml file isn’t uploaded to the correct directory, or the URL is misspelled.

Solution:

  • Double-check that the file is uploaded to your site’s root directory (e.g., public_html or htdocs).
  • Verify the URL by visiting https://yoursite.com/sitemap.xml in your browser. If you see a 404 error, the file isn’t in the right place.
  • If you’re using a caching plugin, clear your cache to ensure the file is accessible.

2. Invalid XML or Formatting Errors

Cause: The sitemap contains invalid characters, malformed URLs, or incorrect XML syntax.

Solution:

  • Use the XML Sitemap Generator tool to validate your URLs before generating the sitemap. The tool will flag invalid formats (e.g., relative URLs or missing protocols).
  • If you’re editing the sitemap manually, ensure all tags are properly closed (e.g., <loc>https://yoursite.com/</loc>).
  • Avoid using special characters like &, <, or > in URLs—use their encoded equivalents (&amp;, &lt;, &gt;) instead.

3. URLs Not Indexed After Submission

Cause: Search engines may take time to process your sitemap, or the URLs may be blocked by robots.txt or meta tags.

Solution:

  • Check Google Search Console’s Coverage report to see if the URLs are excluded due to crawl errors or indexing issues.
  • Verify that your robots.txt file isn’t blocking the URLs. Use the Robots.txt Generator tool to create a valid file if needed.
  • Ensure the pages aren’t blocked by meta robots tags (e.g., <meta name="robots" content="noindex">). Use the Meta Robots Generator tool to create valid tags.
  • Be patient—Google may take days or weeks to index new pages, especially for larger sites.

4. Duplicate URLs in the Sitemap

Cause: The same URL appears multiple times in your sitemap, which can confuse search engines.

Solution:

  • Use the XML Sitemap Generator tool to deduplicate your URLs automatically. The tool will warn you if duplicates are detected.
  • If you’re manually editing the sitemap, remove any duplicate entries.
  • Check for variations of the same URL (e.g., https://yoursite.com/about and https://yoursite.com/about/) and standardize them.

5. Sitemap Too Large (Over 50,000 URLs)

Cause: Google limits sitemaps to 50,000 URLs per file. Larger sites may exceed this limit.

Solution:

  • Split your URLs into multiple sitemaps (e.g., sitemap-posts.xml, sitemap-pages.xml).
  • Create a sitemap index file to reference all your sitemaps. Example:
    <?xml version="1.0" encoding="UTF-8"?>
    <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
       <sitemap>
          <loc>https://yoursite.com/sitemap-posts.xml</loc>
       </sitemap>
       <sitemap>
          <loc>https://yoursite.com/sitemap-pages.xml</loc>
       </sitemap>
    </sitemapindex>
  • Submit the sitemap index file to Google Search Console instead of individual sitemaps.

6. HTTPS/HTTP Mismatch in URLs

Cause: Some URLs in your sitemap use HTTP while others use HTTPS, which can cause indexing issues.

Solution:

  • Ensure all URLs in your sitemap use the same protocol (HTTPS is recommended).
  • Use a tool like the Htaccess Generator to enforce HTTPS across your site.
  • If you’re migrating from HTTP to HTTPS, update all URLs in your sitemap and set up 301 redirects from the old URLs to the new ones.

By addressing these common issues, you’ll ensure your XML sitemap works as intended and helps search engines index your WordPress site efficiently. If you’re still encountering problems, use Google Search Console’s URL Inspection tool to diagnose specific URLs and see how Googlebot views them.

If you're weighing options, How to Extract Every URL From a Website Sitemap covers this in detail.