0

I was wondering how you can safely edit (like see the changes before actually updating) functions.php.

I was wondering this because a while ago I made a error in functions.php (one too much..) and it caused wordpress to crash.

It might be worth noting that I do not have any ftp accses to the website..

1

I don't really think there is a safe way to make changes to your functions file, and for that matter any other template file. And I personally think that the back end editor are a big evil.

It is unwise to make any changes to a live site, period. Any type of syntax or fatal error will crash your site, and the only way to fix this is to log via ftp and deleting the changes you've made. On a high traffic site, this is disastres.

Always always set yourself up with a local test site. There are many around, and are quick to set up on your pc. I personally use XAMPP, but that will be totally up to you. The advantage of such an offline test site is that you can test code and fix all possible errors before you make this changes to your live site. And if there are errors in the code and it breaks your test site, it can be quickly fixed.

I would also suggest that if you need to make changes to a template, download it to your local installation, make the changes, test it, and if you are happy with your changes, upload it back via ftp. Never use the backend editor for this

EDIT

Misread your question a bit, only realized that you don't have ftp access when I eddited your question.

So how does this influence what you should do? Well, you still have to set yourself up with a test local site. The problem is, if you've made changes to a template and it works offline, you can't just simply ftp it back to your live site. Here, unfortunately you have to use the back end editor. I would suggest, delete all the content of the template, and then copy and paste the complete offline template to the online template. This will be the easiest way to make sure that an error doesn't slip in anywhere

I would also suggest that you look for a host that support cpanel.

|improve this answer|||||
  • Thank you for the reply.. funny thing is, that while editing functions.php 5 min ago the site crashed again! ^^" So using a local test suite would not be a bad idea. The only problem is that i am behind a cumputer that is not my own.. (here is a link to the site ;) [link]irsa.nl/website/[/link] – glaasje May 15 '14 at 6:56
  • Ouch. This makes it really difficult then. Unfortunately you will need to set yourself up properly if you want to maintain a website. You are currently working in the dark. – Pieter Goosen May 15 '14 at 7:05
  • You can also create an online test site, but then again you will need ftp access. I would really recomment, change your host (get someone with cpanel) and get yourself a pc, otherwise I can't see any other way – Pieter Goosen May 15 '14 at 7:08
  • It might sound funny but you can almost compare building this website with being strapped upside-down on a drunk donky that is riding off a cliff.. :3 – glaasje May 15 '14 at 21:13
  • Hahaha, true. Well said +1 – Pieter Goosen May 16 '14 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.