A Quick List of Checks & Actions to Perform Before Starting to Code
While working on various and diverse projects, that are either under M&S (already in production and I am only handling support) or ready to go live (hence all the live features are in place), I spotted some issues with working on a
local or staging environment, and made a list of the checks and actions to perform for the current working environments, before actually diving into the code.
Here is a quick list of checks & actions to perform before starting to code.
Most of the times, the project uses Google Analytics and other
tracking codes. Make sure you disable the plugins that register such scripts on your local or staging environment, otherwise, we are tainting
real data statistics and also, the project will load slower since external scripts are loaded at runtime.
Make sure to disable any Redirection plugin, or override the
hardcoded rules. Also, you might want to check if the
.htaccess file contains any hardcoded rules. Most of the times the hardcoded rules will make it more difficult to debug properly or access content as expected, or, when relying on the WP native permalinks and the .htaccess file is overwritten, rules get lost, etc. and accessing pages, features, sections will not be the same.
If the project is using any cache plugin, it might be useful to disable this, or at least to initially
flush the cache so that at runtime a fresh copy of the cached content is generated, referencing local or staging resources.
permalinks for the project, but first, check that the expected permalink format is enabled in your environment.
Make sure to check that the site settings match the expected environment, for example, I encountered a lot of issue with AJAX calls due to the mismatch of
HTTPS settings (for example the site is accessed over HTTPS, but the site settings are hardcoded to HTTP, hence the default AJAX calls performed on admin-ajax.php are failing or there are issues with setting cookies, etc.).