How do I completely nuke my old sitemap and generate a new one?

My site got hacked so right now when I go to [mysite.com/sitemap.xml]), I see lots of hacked and spammy URLs like this in the sitemap.xml: mysite.com/ 9n3siphonophorangc5z9narxh2002331

And they’re in thousands!

I want to remove this sitemap and generate a new one that consists of only the pages and posts created by me, how do I do that?

So far I’ve tried the followings:

* Removing sitemap from GWB tool (I know this wont work but still)
* Disable sitemap from Yoast and then enable
* Adding ” add\_filter( ‘wp\_sitemaps\_enabled’, ‘\_\_return\_false’ );” in functions.php

Nothing worked so what’s the next step I should try?

Once again, all i want is to get rid of my current sitemap and then generate a new, fresh one.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer