Early yesterday morning I had updated the home page for this website. I had mentioned that I had broken and lost this website several different times. And in less than 12 hours I end up breaking the site again. I had written a post explaining some of the difficulties I had with Pinterest. And How Social Media companies are using clankers for their appeals process. Ranting about how AI is making for bad user experience. In the process of trying to upload a file I found that WordPress was only going to allow me to upload an image less than one megabyte. This is a problem that I’ve dealt with before . In previous iterations and installations of WordPress The problem was solved quickly by editing the function.Php. There’s three lines of code paste it at the bottom of the function.Php. Save the changes and then you can upload however big a file you want.
except this time, after pasting those three lines of code and saving the file. The theme broke. Refresh the page and got an error message. The whole website was gone . Home page wouldn’t load, the archive wouldn’t load. Just the same message of an error occurred . What I didn’t realize at the as it wasn’t just the public facing front end. The administrator pages had also been Broken. By dumb luck or some page caching voodoo the administrator page for editing the theme was still loaded in one tab on my browser, And it worked well enough to correct the issue. Just delete code I added in and resave the the. And the site began working again. I should have stopped there and went looking for a different method. But this is a process that I have done several times before. And I was curious if there was some adjustment I could make to get it to work again. I made about three or four different efforts none of them. And of course the whole time I am completely oblivious to the fact the administrator’s Pages are no longer loading correctly, and by dumb luck and cashing black magic I mostly was able to fix the site.
after the last attempt Failed I again deleted only the three extra lines that I added. But after saving what should have been the default function.Php. The entire contents which still showed on the screen after I hit save, was gone. There was no option to press central z and undo it. It was completely cooked, absolutely gone. And of course I didn’t make a backup. Why should I it’s just adding and deleting couple of lines of code. It’s not like the whole file is gonna be suddenly corrupted, I mean that Corruption thing Has only happened four other times.
So the sites dead, even the admin pages, And there’s no backup. Normally the solution is to Switch themes VIA ftp, delete the theme with the corrupted file. Reinstall the theme. And hope you didn’t do any other damage. It takes a while, but it solves the corrupted file issue.
out of curiosity since I have administrator access to another website that’s using the same exact theme that I’m using on this site. Astra. I logged into their site navigated to the Correct file. The functions.Php was copied in its entirety and into my corrupted website. And once I saved the whole site was restored.
The obvious moral to the story is make backups. Frequently. Someday I will learn that moral.
