Support » Fixing WordPress » Can’t edit header.php from dashboard

  • Hello,

    I just updated my theme and as usual was trying to enter the code for the facebook pixel and google analytics.

    But when trying to save changes, I get an error telling me that it’s impossible to check for fatal errors and I must update it through FTP instead.

    Here is the message I get in French :
    ‘Impossible d’envoyer un message au site afin de vérifier l’absence d’erreurs fatales. Du coup, la modification PHP a été annulée. Vous allez devoir téléverser votre fichier PHP modifié par un autre moyen, par exemple en utilisant un client FTP.’

    I’m just concerned that it isn’t working anymore.
    How can I restore this functionality ?

    Thanks,
    Angelique.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Angelique,

    I’m not sure about the error and being unable to save changes to a theme file, but..

    Do you need to add the Facebook Pixel and Google Analytics code in every time you update the theme? If so, this is the incorrect method for editing the theme’s code. Your options are to create a child theme and add the code in that way, or use a plugin to add them in.

    I would suggest a plugin for now, such as Google Analytics for WordPress and Pixel Your Site.

    https://wordpress.org/plugins/google-analytics-dashboard-for-wp/
    https://wordpress.org/plugins/pixelyoursite/

    Yes, every time. Because, as you know, when I update the theme it wipes out all changes.
    I wanted to do it that way because I try to use a few plugins as possible. I’ll start using them now, thanks !

    If someone could help me for the error ocurring when trying to edit header.php, that would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.