pdxsherpa — 2013-08-21T00:15:32-04:00 — #1
am using wpEditor.
It seems that not only it won't let me ftp files to the server (gives me permission error even though i have the permissions) but lately i went to edit the functions.php.
i created an error(unintentionally).
Even after i removed the offending lines, i was not able to save the page. Or copy & paste over it the original copy of functions.php that i had saved in case this happened.
has anyone come across this & is there a way for me to get around it?
Also wpEditor won't let me upload & overwrite an already existing files.
is there a better editor for wp?
jaagare — 2013-08-24T11:02:43-04:00 — #2
Well if I understand correctly, you tried to edit something in functions.php via the wp-admin and it resulted in an error. Once an error occurs it stays and the only option is to either edit the functions.php by FTP or via CPANEL / hosting panel. You say that the FTP is not working. In that case you need to go via the hosting panel check and update the file permissions and try to copy paste the functions.php from your local system to the online file and save it and that should work.
asp_funda — 2013-09-03T18:34:28-04:00 — #3
functions.php of the current theme is loaded before any plugin, so you shouldn't be editing it from within wp-admin, coz as you found out - if you screw up you're jacked!
Basically, editing any theme/plugin/WordPress core file from within wp-admin is a seriously bad idea.
pdxsherpa — 2013-09-04T15:54:56-04:00 — #4
but afaik it's the only way to do it.
w/the exception of doing it on a local sandbox first.
mittineague — 2013-09-04T18:14:08-04:00 — #5
IMHO anything and everything (except possibly very minor edits like fixing a typo or making a small tweak) should be done on localhost first, tested, and uploaded after a backup has been saved.
You may be able to get away with editing a live site for a while, but sooner a later you'll get bit.
asp_funda — 2013-09-04T19:04:52-04:00 — #6
Someone who edits theme/plugin code (editing core code is just asking for trouble) regularly should be using a SCM - not doing so is just being cavalier! I've never understood why people edit code directly on a production site, thats just playing Russian roulette.
oddz — 2013-09-04T21:03:40-04:00 — #7
Partially the systems fault for providing the tools to edit those types of files directly through the admin. Another part is the ignorance of site builders and developers. The way Wordpress provides direct edit capabilities through an admin UI is just asking for trouble. An assumption is immediately formed by ignorant users that it is ok to edit files directly on production when it in deed is not. I'm not just going to bash Wordpress though on that considering many other systems provide similar tools with comparable consequences.
asp_funda — 2013-09-05T12:53:53-04:00 — #8
That's like saying its a car's fault just coz you can drive it up a pole!
jaagare — 2013-09-05T22:49:48-04:00 — #9
Yes, on a live site its best to disable direct edit capabilities in wordpress using htaccess so that even in error no one is able to make changes via the wordpress editor.