• Resolved alwiggins

    (@alwiggins)


    I am working to repair a hacked site for a friend. The hosting provider scans show the site is now free of malware, however there are lingering problems. first is the the fact that the code for the class-wp-rest-comment-meta-fields.php file shows up at the top of all pages. I haven’t quite been able to figure that out.

    I am also unable to access the admin panel. While the provider malware scans come back clean, attempting to access wp-admin yields a redirect and warning that the site is unsafe.

    Let’s tackle one thing at a time. can anyone explain why I am get rest api code in my header.

    Thanks,
    Craig

    • This topic was modified 4 years, 3 months ago by alwiggins.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    (@macmanx)

    Try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), and delete then replace your copies of everything on the server except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    If that makes no difference, try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

    Moderator Dion Hulse

    (@dd32)

    Meta Developer

    however there are lingering problems. first is the the fact that the code for the class-wp-rest-comment-meta-fields.php file shows up at the top of all pages.

    You may find that’s just because the first line of that file is no longer <?php, if you add that on it’s own line at the start it may fix that problem, and allow you to login.

    Do not consider it fixed at that point though, I strongly recommend you follow the above advice and re-install WordPress files, although using the “Reinstall WordPress” button in the Updates section of the dashboard should resolve core files being modified/invalid. And continue to run malware scanners on the site afterwards.

    Thread Starter alwiggins

    (@alwiggins)

    @macmanx thanks for your input.
    – I made a full copy of my current public_html folder and files
    – then downloaded and unzipped the current WP ver 5.6.
    – deleted everything in public-html with exception of /wp-content/ and wp-config.php/
    – uploaded all new WP 5.6 files with exception of /wp-content/
    – have tried disabling all plugins by renaming /plugins/ to /plugin_/ also tried disabling them individually.
    – tried disabling the current active child-theme and its parent theme.

    These steps have provided mixed results. I am still unable to access the admin panel, however the site did come back up – kind of. I have to type the full path.. i.e. https://noteworthy-music-studios.com. simply entering noteworty-music-studios.com yields a blank screen. (I think this is because it adds www. to it. I will work with hosting company on that matter.) When I add the https:// the site comes up because it doesn’t allow www.

    adding /wp-admin yields a blank screen. adding wp-login.php brings up the login screen but passwords aren’t recognized. requesting password change sends email but the link back just brings up a blank page.

    Also unable to use cpanel to access the admin panel so I will be working with the hosting company.

    Thanks for your guidance, it was helpful to a degree.

    Craig

    Thread Starter alwiggins

    (@alwiggins)

    @dd32 thank you for the comment. the first line did include <?php. the error went away, but at this point I honestly don’t recall exactly what I did to clear it.

    Thanks

    Thread Starter alwiggins

    (@alwiggins)

    @macmanx: Site problems resolved with your assistance and a bit of elbow grease. thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Site Header shows class-wp-rest-comment-meta-fields php code’ is closed to new replies.