I uses Dreamweaver, and I have a domain hosted on a public hosting company.
Currently, as I am editing my .php, I have to constantly upload to my domain to test it out. I don't really want to setup a local server like xampp as I want to be able to access to mo开发者_如何学Gost updated of my site across multiple companies and anywhere.
My site is still in very early stage of development.
Is this the typical work flow? 'coz it's pretty annoying to me.
Thanks
What usually happens is that you run multiple servers. It's generally very bad practice to edit the actual website immediately. What if you create a bug? You must certainly will, since nobody programs flawless. There's a paradigm called DTAP
- Development
- Test
- Acceptance
- Production
You develop op your development server, there you can do anything you want. Just mess around and try around stuff until you think you've created a new version. Then upload it to the test server, where you only update a full new version of the website. You can test and see if everything work.
When you have created and tested a new version, you can upload it to the acceptance server, where the customer can see if it for fills it's needs. And when that's done you can upload it to the development server.
Obviously, I understand that in some projects this is a big overkill. So you might want to merge the testing and the development on one server. But what's most important of this is. Make sure development and production is divided. So changes you do, do not immediately reflect on the production server, so if you create bugs, it wont affect the website.
Also, it doesn't even have to be different physical servers, it may also be just different websites on the same server like:
- dev.example.com
- test.example.com
- acceptance.example.com
- example.com
Also make sure you work on different versions of your software. Don't publish just tiny bits. But every time make sure you work towards a new "version" of the website, containing new functionality every time you upload it. Make sure you have certain goals you want to work to like:
Add forum to website, add blog to website, add chatbox to website. And only publish it to production when it's done completely.
Also, if you work in these updates, it's very easy deploy. You just upload a complete website, instead of just ftp'ing different single php file.
I think in your case it would be best to create a subdomain on your host. Then duplicate the database (you could make something to automate this) and site. That way you have the most up-to-date version. When you've created something, push it to the default site.
Here are your options:
- Develop locally, push your changes to a remote server
- Develop locally, use a local lamp / wamp setup to instantly see your changes
- Develop remotely either over ssh or remote desktop. View your changes instantly.
精彩评论