![]() ![]() I’ve got mine in my ~/bin directory which holds a variety of little scripts that I use for everyday development tasks. Put dbsync.php somewhere in your system path. #SYNCHIN LOCAL MAMP WORDPRESS TO LIVE DOWNLOAD#Then after completing checking in and pushing my work on my site I can also quickly push up the local copy of my database like this: dbsync.php put dbs.ini Download & Installation ![]() I usually name my INI file dbs.ini and store it in the root of my local git repository as an ignored file so that it doesn’t get pushed to my remote repository. The format of the INI file looks like this: The remote database is connected to via SSH. The config.ini file is an INI file that contains the credentials for connecting to your remote and local databases. If you want to copy your remote database to your localhost database then use the get parameter. If you want to copy your local database to your remote server, use the put parameter. So I have created a PHP CLI script to make this really easy. Replace my live (remote) database with a copy of my local database.Work locally on things which may involve database modifications.Pull down a current copy of the remote database.Working with the database involves the following process: I toggle between viewing the live site or my local site using my /etc/hosts file (or MAMP’s local name resolution checkbox). The point is that when I am ready to deploy my site I can simply drop all my files on the live server and everything works with no modifications because all the paths and so forth are the same starting from the document root of the site. ![]() You can edit you /etc/hosts file and point your live domain to your local machine while working on your site. I am using MAMP which makes it really easy to set up new local sites with local name resolution. My local development server is an exact replica of my live site. This post is to share a little script I use for copying my local database to/from the remote (live) database. I have configured our server using git (gitosis) for easy deployment of WordPress (and related files) which I’ll write about in a later post. Support – includes Community Forums, in-app support, and ticketing.I develop WordPress sites, themes, and plugins all the time and have been working on improving my workflow.WP-CLI provided, simply type “wp” after opening site SSH. SSH + WP-CLI – Simple root SSH access to individual sites.Mail – MailHog is included to intercept any outgoing email from PHP sendmail for viewing and debugging (this also means you can test emails while offline).Exclude files from your exports such as archives, PSDs. Import / Export – includes site files, databases, config files, log files, and Local settings.All files, databases, config files, and Local settings will be restored. Site Blueprints – save any site as a blueprint to re-use later.WordPress Multisite – support for subdomain and subdirectory installations with one-click to sync subdomain to hosts file.Basic site tunnels provided by Ngrok, persistent URLs with higher connection limits, test stripe webhooks, PayPal IPN, and Rest APIs HTTPS tunnel – Self-signed certificates are automatically created for new sites.Debug – quickly debug PHP (Xdebug available from the Add-ons Library). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |