CMS & WordPress
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?
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.
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.
but afaik it's the only way to do it.
w/the exception of doing it on a local sandbox first.
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.
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.
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.
That's like saying its a car's fault just coz you can drive it up a pole!
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.
This topic is now closed. New replies are no longer allowed.