Giter Club home page Giter Club logo

php-migration's Introduction

PHP-FPM & Nginx Configuration Migration Script

This script is designed to automate the migration of PHP-FPM configurations from an older version of PHP to a newer one, specifically targeting PHP 8.2 to PHP 8.3. It also updates corresponding Nginx site configurations to reference the new PHP-FPM version's socket paths.

Features

  • Migrates PHP-FPM pool configurations from PHP 8.2 to PHP 8.3. (or any applicable version)
  • Updates Nginx site configurations to point to the new PHP-FPM sockets.
  • Backs up original PHP-FPM and Nginx configurations before making changes.
  • Provides options to migrate all configurations or specific ones.
  • Excludes the default www.conf from migration unless explicitly included.
  • Restarts PHP-FPM and Nginx services to apply changes.

Prerequisites

  • The script is intended for use on Linux servers running PHP-FPM and Nginx.
  • PHP 8.2 and PHP 8.3 should be installed on the system. (or any applicable version)
  • Ensure you have sufficient permissions to modify PHP-FPM and Nginx configurations and restart their services (typically requires root or sudo privileges).

Usage

  1. Make the Script Executable: ``` chmod +x migrate_php_fpm.sh ```

  2. Run the Script: ``` ./migrate_php_fpm.sh ``` Follow the prompts to specify which PHP-FPM configurations to migrate.

  3. Options for Specifying Configurations:

    • Enter specific configuration filenames separated by space for targeted migration.
    • Type `all` to migrate all configurations (excluding `www.conf` by default).
    • To include `www.conf` in the migration, list it explicitly along with other files.

Backup

  • The script creates backups of the original configuration files in `/tmp/backup-PHP-Migration_/`.
  • Verify these backups before proceeding with any further changes.

Testing

  • Test the script in a non-production environment before deploying it on live servers.
  • Ensure the script handles your specific server setup and configurations.

Contributions

  • Feedback and contributions are welcome. Please feel free to submit issues or pull requests to the repository.

License

This script is released under the BSD license. For more details, see the LICENSE file in the repository.

Disclaimer

The PHP-FPM & Nginx Configuration Migration Script is provided "as is" without warranty of any kind, either express or implied. Use of this script is at your own risk. While every effort has been made to ensure the script works as intended, the authors take no responsibility for any damages or loss incurred as a result of using the script.

php-migration's People

Contributors

knofte avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.