The following demonstrates how to setup a professional and maintainable deployment workflow for a WordPress application.
This will make sure any ephemeral or configuration files are ignored during the deployment. This file will live at the root of the application.
This is taken dirctly from GitHub's .gitignore repository.
*.log .htaccess sitemap.xml sitemap.xml.gz wp-config.php wp-content/advanced-cache.php wp-content/backup-db/ wp-content/backups/ wp-content/blogs.dir/ wp-content/cache/ wp-content/upgrade/ wp-content/uploads/ wp-content/wp-cache-config.php wp-content/plugins/hello.php /readme.html /license.txt
The most important lines here are
The static files feature is a great place to setup the wp-config.php file.