When you submit a sitemap to Google it tells Google all about your posts and pages and it can get your site listed on Google faster.
To start, create the sitemap on your site. I recommend using the Yoast SEO plugin to create your sitemap, so make sure Yoast SEO is installed on your site.
Then go to your WordPress admin dashboard. Click “SEO” on the left and then go to the “XMP Sitemaps” page.
Set the “XML sitemap functionality” slider button to “Enable.” Then click “Save Changes.”
You’ll see a line that says, “You can find your XML Sitemap here: XML Sitemap.” Click that link and make sure the sitemap comes up (no error message). If not, click “Save Changes” again.
By default the Yoast XML sitemap filename is “sitemap_index.xml”.
Now you may submit the sitemap to Google.
Go to the Google Search Console website and log in (there’s another post on this site that explains how to get a Google Search Console account and add your site to it).
Click on your site in Google Search Console. Then click Crawl > Sitemaps on the left side.
Click “Add/Test Sitemap.” Then copy/paste “sitemap_index.xml” (without quotes) into the URL field and click Submit.
Make sure it submits without any errors. Then you’ll be all set.