Support » Fixing WordPress » PHP Desperation

  • In attempting to edit my comment.php code, I have royally effed up my website. (FoxtaleCosplay.com) Nothing shows up but errors and I can’t even access my admin panel. Help!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Is there any way I can just restore all of the php files to how they were before?

    I feel like the more I mess with it, the more I keep screwing it up.

    This is what shows up when I try and log into my wp-admin:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘sanitize_comment_cookies’ was given in /home/foxtale1/public_html/wp-includes/plugin.php on line 395

    Fatal error: Cannot redeclare comment_exists() (previously declared in /home/foxtale1/public_html/wp-includes/comment.php:19) in /home/foxtale1/public_html/wp-admin/includes/comment.php on line 27

    And if you check out my site you can see that it’s all kinds of wrong right now. All help appreciated. Thank you!

    are you messing with the comment.php in wp-includes?

    That’s a no-no, never mess with Wp core files.

    Restore the file to original.

    Either by reinstalling WP (From the upgrade menu, you can do a 1 click reinstall) or use ftp to put the file back there from a fresh download of your version
    http://wordpress.org/download/release-archive/

    Thanks!

    which one of those should I click on?

    Sorry, I’m computer retarded. How do I do a 1 click reinstall when I can’t access my wp-admin?

    I missed that part, sorry.

    What version of WP do you have installed now? That’s the one you need to download….

    I think it was the latest 3.1.1. So what do I do after I download it?

    Thank you so much btw for your help.

    OMG, Got it!

    Thank you thank you thank you

    I still get this: Fatal error: Call to undefined function have_comments() in /home/foxtale1/public_html/wp-includes/theme-compat/comments.php on line 25

    On each of my posts, though…

    Have you messed with any other files?

    If so, a full reinstall may help

    which is simple if you already know how to use ftp

    basically just reupload all WP files from a fresh install EXCEPT wp-content folder, and wp-config.php file. Never delete those (and always keep backups of them)

    Otherwise, try switching to twentyten theme, and deactivating all plugins to test if any of them are messing with your install

    Okay will do. Is the best way to do that just one file at a time?

    You are godly, btw

    Honestly what I do, is download the wordpress to my desk, delete wp-content folder, and wp-config or wp-config sample from the fresh download folder, then rezip it

    I then delete the files off my server, except for wp-content folder and wp-config.php file (which I back up before I start any of this, just in case)

    Then I upload my custom zip folder (with the removed file and folder) to my server

    I unzip the folder on the server And place the files

    HOWEVER- if you now have admin access, you can go to upgrade section and do a 1 click upgrade to the same version to reinstall, which often works for me when I break something

    Awesome, thanks so much!

    Hello,

    I too, messed something up by trying to make a change to my menu as per below.

    I am using the Mystique theme.

    I already added one link in my top navigation bar, but when I added another, I can’t get into my site (www.healthynomics.com) – I just get a white page.

    Also, when I go to my WP login screen, it redirects me to this:

    http://www.healthynomics.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.healthynomics.com%2Fwp-admin%2Fedit.php&reauth=1

    How can I fix this?

    Many thanks.
    _______________________________________________________

    4. To put a link in the top navigation bar, add following code to, Under Appearance -> Mystique settings -> Advanced > User functions.

    function mymenu(){
    echo ‘

  • <span>Menu Title</span>
    <span></span>
  • ‘;
    }

    add_action(‘mystique_navigation’, ‘mymenu’);
    It is useful when you want to put a external link in navigation bar. Change “Link to your Menu” by your link and “Menu Title” by your title.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘PHP Desperation’ is closed to new replies.