• I’m really at a loss here and hoping someone knows why this is happening.

    I installed a new theme last weekend and everything has been running great until last night. Using the theme editor, I made a very minor change to a php file and clicked “update file.” However, after it saved it, where the code was became blank. It seemed to delete the code. I went back to the php file on my desktop, copied the code and pasted it back into the theme editor, clicked update, blank again. Then I went into FTP and reuploaded that php file into the themes directory and replaced the current file there (which was saying 0 bytes at this time). The file was replaced – I went to my blog, the change is not shown. I go back to the FTP site and the file is saying 0 bytes again. It’s literally deleted everything in itself.

    I’ve now come to learn that this is happening to every php file I try to edit in WP, regardless of the theme (I tried it in multiple themes). Even uploading the files via FTP does not help – if I tried to edit them in WP, they will just keep getting cleared out.

    Help? Please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter the1hangingchad

    (@the1hangingchad)

    I should note that I used both IE and FireFox. The only difference between the results is that IE deletes the code and FF puts a line of garbage characters where the code was (still deletes the code).

    I also have this problem, but it is specific to functions.php in the ClockWorkAir theme. I would really like to know what might be causing this. Any help at all is greatly appreciated.

    It’s not isolated either. http://wordpress.org/support/topic/159061?replies=3

    I have the same problem – every time I edit code in the theme editor the whole php file becomes blank. Once this happens it is impossible to re-add content to that file, as each time I hit ‘update file’ the file becomes blank again. The files I have not edited are OK.
    This has only happened recently and I have updated these files many times before without issue. I have not upgraded my WordPress version or changed theme recently, and as far as I know I have not made any recent changes that might have caused this. I have the same problem on multiple sites. If anyone knows a solution for this, please let me know.
    Thanks

    OK, the issue has been resolved and it was to do with the host. The ftp upload quota had been reached and somehow this prevented the WordPress files from being updated properly. Increasing the ftp upload quota resolved the issue. Hopefully this helps someone.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP code being deleted’ is closed to new replies.