Update wordpress Core Remotely

You have several options: You can install WP-CLI – http://wp-cli.org/ This will allow you to updates from the command line of your server. Use revision control, Git, Mercurial, etc. That way you just pull in updates to your staging server or localhost and push updates to your sever. Using a build script. You can have … Read more

Error: Call to a member function get_error_code() on a non-object

Your function must return the variable $errors – even when there is no new error in your logic. ‘registration_errors’ is a filter, and filters always expect a return value. Without that your function returns NULL, and that is what var_dump() found. So the basic function body should be: function add_user_to_SF($errors, $sanitized_user_login, $user_email ) { try … Read more

wp-load.php redeclares classes

The problem happens when you have a function declared in the root file of the plugin or in the functions.php file of a theme. You need to require_once a file for functions and move those functions into that file. For example: Your plugin is called some-plugin and the root file is some-plugin.php. Any function on … Read more

Fatal error: Cannot redeclare admin_notice() [closed]

Ok, solved my own issue… This might be very specific, but in case anyone ever finds a similar issue: to catch unexpected output errors I had another function: add_action(‘activated_plugin’,’save_error’); function save_error(){ $file = “unexpected-output.txt”; $fh = fopen($file, ‘w’) or die(“can’t open file”); $error = ob_get_contents(); fclose($fh); } there was a typo in the fopen(), which … Read more

Plugin AJAX Save to Custom Table

Please use the available API – as you have it in your question I could take down your entire site in a second. (I wrote this tutorial on Data Sanitization and Validation – the last section is particular relevant to you). As for it not inserting the data, you should check WP_DEBUG is turned on, … Read more