Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm managing a team of 4 developers. We develop CMS based sites on a PHP / MySQL backend.
I want to improve the workflow. What i want:
Are there any services that host a git repo and sync it automatically with the servers?
Production server would be master branch
Testing server would be a different branch
we deal with many small sites and some large so we need workflow to be fast and agile
WHAT ABOUT THE DATABASE ? lol
(if anyone wants to add to the diagram PSD file can be found here: workflow.psd
I'd highly suggest using Beanstalk if you want something quick and easy to set up. It handles deployments very well. If you're looking at doing a bit more yourself (setting up the hooks and such) then another option would be github.
Please do not user Master as your production branch, master should never be production. A better workflow would be to have a Staging, Development, and Production branch / environment. Please see this guide about branching on Beanstalk's guides, it's pretty insightful.
As for keeping track of databases, if your framework / cms doesn't support database migration I'd highly suggest developing some form of migration / database version control in-house. You can also check out a framework like FuelPHP, which has migration built in. A nice little database version control system I found while poking around : dbv.php.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm developing a website, and im doing it on its final destination domain, not on localhost, and its almost finished.
Now I've come to the point where I'm beginning to get worried about what I do when users start using the site and some problems occur, or maybe I want to add a features to the site.
Is there any best practices which will allow be to minimize risks ruinin website and customer UX during updates, how to do it correctly?
If your website is small and easy:
Create a development domain/subdomain
Code and test there
Record all database structure changes (do database changes on a db copy)
Record your actions you use to test your website
As soon as you are ready to release a new version there are two options:
Update db replica and switch domains
Turn main domain off, update code and db, turn on
If website is not that easy, there should be local development, testing, staging and production environments set up independendly. You dev, then you test what you did, then you copy and install your code on real data before pushing it live on production.
To track changes and easily deploy new version to each of environments there are many tools connected with version control systems like git
And there is a good answer on how to use dev-test-stage-production environments with git: git with development, staging and production branches
First of all you have to work on localhost, while developing any new feature, of fixing a bug.
I recommend you also to use GIT branches, so you can create a new branch to add feature of fix a bug.
After finish use GIT merge with your website master branch
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm fairly new to web development and I have only published one website before. With that website I only used some PHP and without framework. Now, I'm planning on using the laravel framework for my next, bigger, website. I'm wondering if there are differences between publishing a website when using a PHP framework? If so, what are the major differences and where can I read about it (googling has not helped me)?
You have countless options. Here are some I am aware of:
1. FTP'ing
Basically, you could just publish your site/app by FTP'ing it up to your server. The biggest issue will be the Database-changes. Here, the main influence is, whether are you able to run migrations or not? You would at least have to have ssh-access to your server with the required prerequisites installed. Otherwise, you would need to keep track of the changes in some other way, and change the db manually (which is not an good option IMO).
2. Automated deployments
There are server-deployment automation-tools, the one i know is capistrano. You can write scripts which do the deployment. These tools are also capable of running migrations, if you tell them to do so, but you would need to have ssh-access for that. Google will tell you the rest, here is a good tutorial.
2.1. Push-to-deploy
If you use SCM for your "bigger project" (which i would highly recommend), you could use push-to deploy technologies. This approarch basically uses Git-Hooks for triggering deployment-scripts. Deeployer could take care of that for you, if you do not want to develop your push-to-deploy-solution from scratch. Other alternatives are Rocketeer (Open Source) or DeployHQ (Paid)
2.2. Using laravel-taylored hosting/deployment/server-management services
Services like laravel-forge or envoyer offer zero-downtime automated deployments. I guess they are also based on push to deploy anyway. If you want to learn more about them, i recommend watching the corresponding laracasts-series (Forge, Envoyer). Be aware that they are not free.
I hope this overview gets you started. Happy deploying!
There is no difference between publishing a plain PHP website and one with a framework. Simple FTP up all your files and it will work, just remember to upload the framework files also.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How to deploy an application (in this case a PHP and MySQL based) in a multiple server environment. To be specific, the application is supposed to be deployed as per below mentioned configuration.
MySQL on Amazon RDS
Application (PHP) on 2 EC2 instances
MySQL part is obvious however I need some clarity on how to deploy the application on 2 servers. I understand that I probably need to setup the application on both EC2 instances and somehow AWS elastic load balancing will automatically balance the load.
Are there any specific configuration/code changes I need to make in the application to work in such an environment? In my case the application would be based on either Cake or Yii. Are they cloud ready by default? If not, what changes, if any, that are needed.
Essentially, I am looking for a guide or instructions which clarifies all such doubts and helps me deploy the application as per above mentioned configuration.
I'm using Capistrano when I deploy my Yii application into multiple ec2 instances.
I think the following article would help :
Deploy PHP Websites Using Capistrano (and Git) | Fred Wu's Blog
http://fredwu.me/post/720733257/deploy-php-websites-using-capistrano-and-git
Then, following would help, when you create your first config file of Capistrano for Yii.
deploy.rb
https://gist.github.com/kix/3913165
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I've been a web developer for the better part of a decade and think that its time to revamp my workflow. As the volume of work continues to increase with my business, I'm looking for every possible way to save time.
What I'm Doing Now
All my sites are WordPress based
During development I'll work directly on a testing site (myproject.mytestingdomain.com) using Notepad++ and FTP
I'll then deploy the site to the live site
The Main Problem I'm Having
When developing additions to, I'm not sure how to sync the ever growing LIVE data of the site with a modified schema and development data. Usually additions to a site requires some additional rows to the wp_options table and some to the wp_posts table. How can I make sure this newly created data is in sync? Is there a program that I can use to compare and sync data?
What My Ideal Would Be
Local Dev
Git Version control
Auto FTP to development server
Better PHP editor (code completion, code hinting)
Any and all suggestions would be helpful!
I work at a development studio that deals with Wordpress sites a lot. We use several tools to keep everything synced up and easily deployed.
The first tool is Beanstalk (beanstalkapp.com) that we use to deploy code to production or staging environments via SSH after it has been pushed to the repository with Git.
The second tool that is really helpful is WP Migrate DB Pro (http://deliciousbrains.com/wp-migrate-db-pro/) which keeps the live copy of the database synced with my local development server.
I would recommend getting away from using FTP in favor of SSH for your managing your files and you should check out Sublime Text 2. It's miles better than notepad++ once you get it configured. There are several tutorials on Tuts+ that show you how to set it up for WP development.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have inherited a little database driven PHP site.
I am a C# programmer, and have almost zero experience with PHP, although I have great experience with databases and some html / web design.
My boss tasked me to create a staging and production environment for this php site.
Environment: Win 7, 64 bit. Sql Server 2012. PHP 5.2. There are a couple hundred users. We only the need the site to work with explorer. Dreamweaver latest version. There would not be more than 1 user working on the project at a time.
Which code repository should we go with?
For now we are not going with a code repository yet. Besides having separate folders for staging and production, would we need any other folder structure?
I also would be very grateful for your help in formulating the right questions to ensure that I have everything that a "professional" developer needs to set this up.
Maybe.. You're looking for http://www.xampp.org, its an all in one solution :)
You can however customize the environment once installed.
Even the PRO's use it :) because it makes it all very simple and quick :)