Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6102165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:34:59+00:00 2026-05-23T13:34:59+00:00

I mantain a custom PHP application (build for me) that is hosted in a

  • 0

I mantain a custom PHP application (build for me) that is hosted in a web server. Sometimes I add new features or repair bugs, and after test in local I upload the changes to the web server. It’s not a critical application (is a game), but the most of the time there are some people connected.

The steps that I make to upgrade the application:

  1. Access via FTP (Filezilla)
  2. Upload a .htaccess file that redirects all the people (except my IP) to a mantain.html file
  3. Check that access is denied for other IP except mine.
  4. Backup old code
  5. Upload new code
  6. Go to PhPMyAdmin
  7. Backup DB
  8. Execute scripts for the DB
  9. Test that all works fine (if not -> revert the backups)
  10. remove .htaccess file

I usually spend an average of 30 minutes doing these steps, and I’m wondering if there is any way to optimize, automatize or doing something to spend less time. Also I know that if I can automatize some steps there are less prone to have errors.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:35:00+00:00Added an answer on May 23, 2026 at 1:35 pm

    Several other answers suggest PHP-specific deployment tools, but being as I’m not very familiar with PHP, I’ll offer some general tips. These suggestions may be redundant by some of the other tools already suggested, though.

    First off, don’t upload a new .htaccess file every time–just have two of them on your server. Perhaps call them .htaccess-permanent, and .htaccess-maintenence. Then create a symlink to the one that ought to be active. Then once you’ve tested that access is properly denied once, you don’t have to do this manual testing phase every single time you do an upgrade.

    I’d also write a shell script to do most everything for me. My new work flow would look like this:

    1. Upload new code to server in a directory called new/
    2. Log in to the server via shell, and execute the upgrade script
    3. Test the new site
    4. Run upgrade-finalize

    The end.

    Now for the interesting part, the upgrade script will do this:

    1. It will delete the .htaccess symlink, and re-create it, pointing to .htaccess-maintenence.
    2. It will copy the current code in current/ to backup/
    3. It will back up the DB, using the exact same commands that PHPMyAdmin uses
    4. It will move the contents of new/ (which you just uploaded) to current/
    5. It will execute the scripts for the DB

    And the upgrade-finalize script will simply:

    1. Delete the .htaccess symlink, and re-create it, pointing to .htaccess-permanent once again

    The only possibly tricky part here will be getting the exact commands that PHPMyAdmin uses to back up your database, but it’s probably a simple mysqldump command, and you can probably get that info from PHPMyAdmin or some logs, or something. Sorry, I don’t know more about PHPMyAdmin to help in this specific area.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to restart server from ASP.NET application that is hosted by LocalSystem
I have just created a mid-sized web-application using Java, a custom MVC framework, javascript.
My application has a custom window design, which means that every window has the
I'm going to have to build a custom control for a WinForms application. But
We have a custom-built Flash-based video player that I maintain, and it needs to
I currently mantain an open-source project hosted in SourceForge. My project is written in
I'm working on a custom plot on top of which I add a second
I am maintaining a custom built and highly OO e-commerce application. The original designer
We currently have a product that uses Sharepoint and a number different Web Part
I have a custom PHP framework and am discovering the joys of storing configuration

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.