WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Editing a Plug-in Killed the Whole Blog - Please Help (5 posts)

  1. keelyh
    Member
    Posted 6 years ago #

    I tried to edit Alex King's Popularity Contest plug-in to change the number of displayed posts. I didn't really know what I was doing, but I figured if I saved the original coding I could put it back the way it was originally if I broke anything.

    I changed a line of code in "The Loop" section.

    I'm 90% certain the line of code originally looked like this:

    function show_report($type = 'popular', $limit = 10, $custom = ()) {

    I changed it so it looked like this:

    function show_report($type = 'popular', $limit = 10, $5 = ()) {

    It gave me a failed error message. I tried to change it back but it kept saying fatal error and deactivating the plug-in.

    It's taken down the whole blog. The posts aren't displaying, the about page isn't displaying. I basically killed the blog with a single keystroke.

    Any suggestions?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Replace your changes with the original code. You may have to redownload the plugin files.

    Alternatively, if you just want the blog running again, delete the plugin file. WordPress won't try to load it if it's not there. The plugin naturally won't work anymore until you fix it or get a fresh copy.

    And don't edit live code in the future unless you really know what you are doing.

  3. keelyh
    Member
    Posted 6 years ago #

    Lesson learned about the editing code. How do I delete a plug-in? I only see how to deactivate one.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    You FTP to the server and delete the plugin file or directory or whatever. Same way as you put the plugin file there to begin with, only you're going to delete it this time.

    Note that if it's already deactivated, then deleting it won't fix anything. Deactive and deleted are functionally equivalent. If you're blog is still broken, then it's because it's trying to use a deactivated plugin.

  5. keelyh
    Member
    Posted 6 years ago #

    Okay, we're in business again. Thanks for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic