Hi @tsvetanm,
In case you are wondering, the problem was caused by Wordfence, only WF is no longer installed on the staging site that was having this problem, even though I removed all traces of it, including the database tables.
After contacting WF support, they suggested I create a .user.ini file in the public_html folder of the staging site and add the following line to it: auto_prepend_file = none They went on to say that it was because I removed WF from the staging site that I experienced this problem. For some reason, WF on the main site was ‘seeing’ what I was doing on the staging site and blocking me, on the staging site, in more ways than just this one instance.
I removed WF from the staging site because it is the Premium version which complains about being used on another site. I also don’t think I need it on a staging site because I always password protect my staging sites, and this particular staging site is only for testing and won’t be pushed back live.