Something I've adopted for my PW sites is putting environment-specific DB credentials and configuration in a separate file, /site/config.local.php:
/**
* Installer: Database Configuration
*
*/
$config->dbHost = '127.0.0.1';
$config->dbName = 'db';
$config->dbUser = 'default';
$config->dbPass = 'default';
$config->dbPort = '3306';
/**
* Installer: HTTP Hosts Whitelist
*
*/
$config->httpHosts = array( 'my-local-domain.test');
And then including that file into /site/config.php:
/*** INSTALLER CONFIG ********************************************************************/
// DB Config, Hosts Whitelist
include dirname(__FILE__) . '/config.local.php';
I find this makes it easier to push changes when using version control (i.e. git) across different environments, and keep the credentials and other sensitive information excluded from the repo.
On some managed hosts like Cloudways, you can pull and push DB changes from staging to/from production applications, as well as branch changes from git. Obviously this doesn't help when you make DB changes locally, though.
Otherwise, I will either export/import the entire DB via the Database Backups module, or Pages Import/Export (under Admin > Modules, Core modules) depending on the kind of changes.
After using Vercel and Netlify for static-based websites, it does make me wish there was a quicker way to push/pull DB changes, but perhaps that extra bit of friction is good so you don't inadvertently disrupt your production data. Definitely something I can improve in my own workflow!
Managing local/remote image assets
Occasionally I've added this code snippet to /site/ready.php, that allows for your local installation to pull down the asset from prod, which can save you some time.
I'm also generally curious to know more about other folks' deployment strategies – could be a potentially useful thing to collect and make more visible in the PW docs, too.