Generally, you come across this situation when your website is not updated, and these spam posts are created by bots.
To overcome this issue, first delete all the spam posts.
Click on the update link and wait. It may take some time, please do not close your window. If you close the window, your WordPress version update will not complete and incomplete update is worse situation.
WordPress has the tendency not to intimate you about WordPress version update completion. If you have waited for long and want to understand the situation. Login to your site from a different browser and go to any page, check your visual composer or check your plugins.
Don’t go by the fact that admin dashboard no longer requests for version update. ‘Update your site to latest WordPress version’ link will not show as soon as your WordPress starts update procedure. That doesn’t suggest that WordPress update is complete.
Also make sure you update all your plugins that requests to be updated.
To rectify this issue, install classic editor plugin and activate the same.
And also, if you have any doubts that your system has any virus, make sure to change your WordPress admin login password and also, change your cpanel login password.
That’s about it. Observe your site for the next 2-3 days for spam posts. This should be resolved, and you should not be getting any.
We would also like to inform you that we, Imajine take website maintenance projects too, along with other things it also includes regular website back-up and WordPress version update. If you have any such requirement, please do get in touch with us at ‘reachout at imajineweb dot com’. We would love to hear from you.