When to use action hooks and plugins

First of all, see this WordPress Codex page: AJAX in Plugins You don’t technically need to write a plugin to do what you want to do, but it is good practise to do so, especially for the kind of functionality you are building. (Building a database table, handling form data, submitting with AJAX, etc.) Check … Read more

Transient feeds and caching error

Since you mentioned that this is only happening on certain environments then a possible cause could be that those servers do not have the proper PHP extensions installed to handle parsing XML. Here’s a great Stack Exchange answer that outlines most (if not all) of the required extensions. Specifically, I would confirm whether or not … Read more

Form Data not getting stored in WordPress database

According to WordPress Codex about the template_redirect hook: This action hook executes just before WordPress determines which template page to load. So, you are redirecting the user to another page before the template is even loaded, which your form won’t load at all. You can use another hook which runs after template_redirect, such as wp_footer. … Read more

Change WordPress prefix for only one table?

In wp-config.php for your second site, define the following two constants: define(‘CUSTOM_USER_TABLE’, ‘yourfirstprefix_users’); define(‘CUSTOM_USERMETA_TABLE’, ‘yourfirstprefix_usermeta’); You’ll have to add some custom logic to your second site limiting logins by user role.