We are going to use WordPress reset plugin for doing that. Before we start, you should know that:
After reset, all website content including pages, posts and media and all settings will be deleted.
Plugins and theme will not be deleted, but you should activate them again.
Only use WordPress reset plugin when you don't want your current website anymore.
Now let's get to work:
The first step is to install the “WordPress Reset” plugin by going to WordPress dashboard >> Plugins >> Add new
Now search for “WordPress Reset” and install “WordPress Reset” plugin by “Matt Martz”.
After installation and activating the plugin, go to WordPress dashboard >> tools >> reset
Now type “reset” and click on the reset button.
After that, your WordPress will be as good as new without any post, page or media.