How long has this been happening for?
Is it random?
Is it all theposts all the time?
Did you buy your get your theme from a reputable website / company?
She your functions.php file this string:
ad_expiry
Scan your site for malicious code:
https://ww.wp.xz.cn/plugins/malcare-security/
https://ww.wp.xz.cn/plugins/wp-malware-removal/
If there is nothing found, I would download my site and search within files for:
ad_expiry
base64_decode
Do you have this installed?
https://ww.wp.xz.cn/plugins/post-expirator/
Login to your Control Panel at the host and check your crons:
https://www.siteground.com/kb/how_can_i_create_cronjobs/
Thanks for your response and help.
As far as I know it happened once in the last couple of weeks, and I noticed it on Wednesday. It affected some pages and some previously published posts. I corrected all of them by restoring from Trash, or by republishing the posts that were moved to Drafts.
Then on Thursday there were 48 previously published posts moved to Drafts. This was approx. 1/4 of all published posts. I had to republish these posts also. It has not happened again since then.
My theme is from WordPress.
I did not find ad_expiry in the functions.php file.
I scanned my site for malicious code and nothing was found.
I do not have the post expirator plugin.
The only thing I can think of was I was having a problem with a quiz plugin and I gave them permission to look into my site. A day later I saw that they totally changed my homepage by removing some features & widgets, and also moved some of the widgets to the sidebar. This completely changed my site appearance and I was not happy, so I removed their plugin and changed my password to the site. Perhaps they also moved around some pages and posts, I don’t know.
This never happened before in several years, and so far it hasn’t happened again.