NextCloud is hosted on old server and i want to move it to new server with PHP upgrade. Actually idk how to do it and what should I take care during the switch the server also when changing the PHP version.
Can you please help me with that how I should start and any reference or documentation?
thanks!
I think the PHP version plays a subordinate role. The most important thing is that you keep the Nextcloud version. Which Nextcloud version are you currently using? Exactly the version incl. sub-version must then also run on your new server. However, if you migrate everything, your Nextcloud folder with the old Nextcloud version should also be included.
If it is e.g. Nextcloud 29 or 30, for example, you can look here for supported PHP versions. Change the number in the path to determine your version. Does your new server support one of the PHP versions? Then it should be easy to migrate.
Nextcloud 30:
System requirements — Nextcloud latest Administration Manual latest documentation
https://docs.nextcloud.com/server/30/admin_manual/installation/system_requirements.html
Nextcloud 29:
System requirements — Nextcloud latest Administration Manual latest documentation
https://docs.nextcloud.com/server/29/admin_manual/installation/system_requirements.html
Please give us more details such as operating system (from → to) and PHP version (from → to) for better support.
To move Nextcloud to a new server and upgrade PHP, follow these steps:
1. Backup Everything
- Backup all your Nextcloud files, the data directory, and your database to ensure nothing is lost.
2. Prepare the New Server
- Set up the new server with your preferred OS, web server (Apache/Nginx), and database (MySQL/PostgreSQL).
- Install PHP 7.4 or newer (PHP 8.x is recommended) along with necessary PHP extensions like
php-curl
,php-xml
, andphp-gd
.
3. Transfer Data & Database
- Copy your Nextcloud files and data directory to the new server.
- Export and import the database to the new server, ensuring it is linked to your Nextcloud installation.
4. Update Configurations
- Edit the
config.php
file on the new server, updating the database and file paths as needed. - Make sure the correct PHP version is active on the new server.
5. Test and Update
- Access your Nextcloud on the new server to check if everything works.
- Run the Nextcloud upgrade process to ensure the system is up-to-date with the new server.
6. DNS/IP Update
- If the server’s IP or domain changes, update your DNS settings accordingly, and adjust the
trusted_domains
setting in the configuration.
7. Final Checks
- Perform integrity and security checks to ensure everything is working correctly and securely.
thanks for ur cooperation. can u plz tell what I need to be considered when changing the PHP version (8.3)?
thanks again!
Basically, the NextCloud instance I am using is hosted on an old server, and I want to move it. I also want to upgrade to a PHP version like 8.3.
Can you help/reference me which should i need to take into account during the server switch?
And what needs to be considered while change the PHP version?
thanks!
Basically, the NextCloud instance I am using is hosted on an old server, and I want to move it. I also want to upgrade to a PHP version like 8.3.
Can you help/reference me which should i need to take into account during the server switch?
And what needs to be considered while change the PHP version?
Old OS?
Old OS version?
Old PHP version?
New OS?
New OS version?
New PHP version?
The Nextcloud version you have installed on the old server and want to move to the new server must be compatible with the PHP version you are planning to install on the new server, respectively you need to install a PHP version on the new server that is compatible with the Nextcloud version you are moving over from the old server.
So as @devnull already asked, which versions (Nextcloud and PHP) are currently installed on the old server, on which OS, and which OS do you plan to use on the new server?
And please also read this article in the documentation: Migrating to a different server — Nextcloud latest Administration Manual latest documentation
i don’t know how large your instance is, but it might be easier and smoother not to do everything at once but plan the migration in different steps. if you upgrade everything at once troubleshooting on the new system can be very hard and time-consuming.
(theoretically you coulkd just stop everything on the old server and rsync everything to the new one, best booted in rescue or sht, if possible and perform all upgrades step-by-step.)
GOOD LUCK!