WordPress.org

Forums

wp-admin blocked by rogue code (13 posts)

  1. oliver.athabasca
    Member
    Posted 1 year ago #

    My wp-admin is inaccessible due to a code that has been placed somewhere in the theme functions file in the backend of the site. I have tried accessing the FTP for the site using CyberDuck however I really need to access the actual back end of the wordpress site. The code is somewhere in the functions-file page

    << - add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); >>

    Is there a way to access the actual page and not just access the FTP for this site? I know that if I could access the backend I can find this code and remove it.

    the WordPress site is http://www.deddog.com You can see the url blockage if you type in deddog.com/wp-admin

  2. Dave Naylor
    Member
    Posted 1 year ago #

    Can you get in here?

    http://www.deddog.com/wp-login.php

  3. oliver.athabasca
    Member
    Posted 1 year ago #

    I cannot. I'm being told to enable cookies for my browser (Chrome). Which I have already done. I'm assuming this is another issue however it may be from the rogue code.

    ***cookies are enabled. attempts to sign in request to enable cookies.

  4. Dave Naylor
    Member
    Posted 1 year ago #

    OK, you're going to have to login using FTP then. Simply navigate to wp-content/your-theme/ then download and edit functions.php, then re-upload.

  5. oliver.athabasca
    Member
    Posted 1 year ago #

    Ok thanks.

    This is using CyberDuck as the FTP device, correct?

  6. Dave Naylor
    Member
    Posted 1 year ago #

    Sure, it's not my favourite but it'll do :)

  7. oliver.athabasca
    Member
    Posted 1 year ago #

    Okay, I've found and deleted the rogue code. And saved the updated file. Can you give me the steps to re-upload this revised file please?

  8. Dave Naylor
    Member
    Posted 1 year ago #

    Select it in CyberDuck and hit upload. You could probably drag and drop it into the directory on the remote server.

  9. oliver.athabasca
    Member
    Posted 1 year ago #

    Will I need to delete the old file?

  10. Dave Naylor
    Member
    Posted 1 year ago #

    It should overwrite it, probably asking you if that's OK if before it does.

  11. oliver.athabasca
    Member
    Posted 1 year ago #

    I removed the code and the file was overwritten.

    New error page has appeared. Please see < http://www.deddog.com >

  12. Dave Naylor
    Member
    Posted 1 year ago #

    I'm thinking that functions.php file had some theme specific functions, and you removed them. Can you upload a clean functions.php file from your downloaded them?

  13. oliver.athabasca
    Member
    Posted 1 year ago #

    OOPS.

    Sorry for the time delay, I'm working from Indonesia. Only functions file I can see is the one that is replaced. Which is the exact replica minus one line of code.

    Can this be fixed?

Topic Closed

This topic has been closed to new replies.

About this Topic