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.
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.
Update 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 HTTP vs. 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.).
See other tips & tricks
How to set up a cPanel VPS on a server running Proxmox, with only 1 internet connection I am sharing this cool video tutorial for anyone that needs to install cPannel in…
How to fix translation in multi-language website + WooCommerce + AJAX checkout I have been working recently on a multi-language website that is using WooCommerce > 3.5…