How to Create a WordPress Website Sitemap.xml File
A sitemap.xml file is very similar to a traditional website map, but it can scale a whole site and offers a few more options. While you can use a sitemap.xml file with any content management system (CMS), it is primarily designed for use with WordPress, the most popular content management system (CMS) used on the web today. The following will teach you how to create a sitemap.xml file for your WordPress blog.
The Basics
As its name implies, a sitemap.xml file will contain a list of all of the blog post and page links along with their titles. The file can be created with any text editor and then uploaded into WordPress, typically through the admin panel. Your existing posts and pages will be available for you to add to the file. You can also use a tool like Google XML Sitemaps to generate the XML file for you.
Adding New Content to Your Sitemap
As the name suggests, a sitemap.xml file lets you add new content to your site without having to update the URL in all of your posts and pages. Instead, you can simply add the content to the sitemap file and WordPress will automatically update the URLs for all of your content.
To add a new blog post to your website, simply add the title of the post along with an anchor text within the body of the text. For example, let’s say you’ve created a post called “How to Host the Perfect Family Picnic”. To add this to your Sitemap file, simply add the following content: