I have a WordPress site currently live on an Amazon EC2 server. We are constantly making changes to this site, and would like to set up a development server where we can make changes and test them here. Once everything looks good then be able to deploy the changes to the live server. Is anyone able to help me get this set up properly? I know I need to use Git and GitHub but I don’t know how to initially set everything up here to copy my site. Especially since I would need to be able to be connected to the live database. Any help would be greatly appreciated.
Right, well the way I see it is, it’d be best to just do a custom template and download the wordpress files to that. Then during the install, point it to your ec2 database so it’ll have all your settings. You can sync the web files with github but have it ignore the wp-config.php file. On the dev build, manually specify the domain and main url parameters in the config so it doesn’t affect links on the live site. Instructions to do that can be found on wordpress’ website.
Personally, I’d run two separate instances so actions on one doesn’t break the other and just copy any changes when you are sure it works. You can use ssh to push the files over or sync it all with github as I said before. I’d also use bitbucket for the private repos.
Hopefully this helps.
If I point it to my ec2 database, then when I’m on my testing server and click on a link won’t that take me to the live server version of the page? Or is specifying the domain on the dev build going to fix this? Sorry I’m completely new at this whole thing. Once I make changes - only changing files within my theme folder - how do I push files to ec2 server? I have github set up with a private repo already. I know how to push files there, but not to my EC2. Do I need to setup CodeDeploy with Amazon? Thank you for your help!