How To Edit Functions.php File In WordPress Through Cpanel


Let me guess, you edited the functions.php file of you’re theme, saved it and then BAM! You can’t access the login. You get a white screen or an error page, parse error or syntax error. Not to worry though. This can be solved rather simply.

Remember, whatever you are uploading and editing on you’re WordPress dashboard is saved on you’re Cpanel. So all we need to do is get the function.php in Cpanel.

Now if you have the theme backed up somewhere with access to the functions.php file then that is great. We can re-upload the file. If not, then you need to remember what edit you made that caused this error, as you will need to remove these changes from the functions.php file in Cpanel.

So log in to Cpanel and click on File Manager.

You will be prompted to open the Webroot directory, click Go. Another window will open and you will have access to all you’re files here. In this window, you need find and go into the folder wp-content.

Inside this folder, you then need to navigate to the themes folder. Inside the themes folder, you need to find the theme you are currently using. Double click on that theme. It is inside this folder you need to either upload another copy, indicated by red arrow on the left in image below. Or edit the functions file by right clicking and click edit, indicated by red arrow on the right in the image below.

Of course if you are uploading the functions.php file, you will be prompted the file already exists and you will need to overwrite it.

So there you go, that’s how to recover from the parse errors when editing functions.php

Thanks for reading, let us know how you get on in the comments section below!

Comments

  1. Thank you. Thank you. Thank you! Saved :)

  2. Thank a lot my problem is solved by u. and I ve learned something.

  3. Great Work with writing this post! You just saved me. You’re intro was spot on :)

  4. Thank you!!! A billion times thank you! It worked like a charm.

  5. Darlington says:

    Found this very very useful!!! thanks a million.

  6. Scarlet Gem says:

    Bundle of thanks for this useful information.

  7. Saved my a$$! You Rock!!!

  8. I just wanted to tell you that i love you. Yesterday i wanted to change the main url from my website, added two scripts in the functions.php file and, well, you know the rest of the story. You saved me. Love you misterious hero.

Speak Your Mind

*