WordPress Development Workflow Suggestions [closed] - php

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.

Related

How do I "patch" my website without the fear of breaking something? [closed]

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

How to connect code base for a team of developers working on a project running on a VPS? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
What is the best way to connect a team of developers working on a project which runs on a VPS, We have Mac and windows development Environement and VPS is Based on CENT OS?
I am totally newbie at creating a shared codebase.
I am laravel, ionic, javascript, angular and node developer.
The ease of doing this is nearly zero when we have to continuously change code and multiple people have to update different script files on the Project from Mac and Windows development environment.
We use the later described technology, we want to connect to the servers and the code that is written should reflect on the servers. Right now we have to copy all the code and than paste it on the servers?
Should we go for SVN or GIT, and how to execute the Shared code base Environment?
Develop locally
You definitely have to go with git to synchronize your code between all developers.
Git will ease most of the synchronization / merging work. All you have to do is to get familiar with it and its workflow. I know it can seem a lot at first but since every company is using it, it's not a waste of time.
Each developer works on his own machine (localhost) and commits / pushes to git when it's working properly. Other developers pull the changes to get new updates from the other developers on the team.
Don't shy away from using branch system to work simultaneously on different features / part of you app and pull requests to review code of other developers.
Worry about deploying to the VPS later: setup your git repository (github, bitbucket) and work locally.
Deploy later
Then, once you've reached a working version of your app/website, you can push your code to the VPS server using git as well and make it available to all for testing. You have to have SSH access on it.

Publish website when using php framework (laravel) [closed]

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.

What are some efficient ways to set up my environment when working on a remote site? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Hello fellow Programmers,
I am still a relatively new programmer and have recently gotten my first on-campus programming position. I am the sole dev responsible for 8 domains as well as 3 small sized PHP web apps.
The campus has its web environment divided into staging and live servers -- we develop on the staging via SFTP and then push the updates to the live server through a web GUI.
I use Sublime Text 2 and the Sublime SFTP plugin currently for all my dev work (its my preferred editor). If I am just making an edit to a page I'll open that individual file via the ftp browser. If I am working on the PHP web app projects, I have the app directory mapped to a local folder so that when I save locally the file is auto-uploaded through Sublime SFTP.
I feel like this workflow is slow and sub-optimal. How can I improve my workflow for working with remote content? I'd love to set up a local environment on my machine as that would eliminate the constant SFTP upload/download, but as I said there are many sites and the space required for a local copy of the entire domain would be quite large and complex; not to mention keeping it updated with whatever the latest on the staging server is would be a nightmare.
Anyone know how I can improve my general web dev workflow from what I've described? I'd really like to cut out constantly editing over FTP but I'm not sure where to start other than ripping the entire directory and dumping it into XAMP.
Are you using source code control? If not, you should. I suggest using Git, for example hosted on Github.
For a simple setup like this you don't need to use any special deployment tools; you can also use Git for deployment.
Developing directly on the staging server is not a great idea. Try to set up a development environment environment on your laptop.
You can push from your development machine to Github. Then then on either staging or the live server you can connect via ssh and pull from Github.
This allows you you to use all the power of Git to create branches and tags and to rollback to an earlier version if you make a mistake.

Web Development Work flow using git [closed]

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.

Categories