Updating

This guide outlines the necessary steps for updating the Pteroca Control Panel, including file synchronization, dependency management, database migrations, cache management, and permissions.


Important: The app:update-system command is available starting from version 0.4.3. If you are on an earlier version, you’ll need to follow the manual update instructions first before you can use this command.

Updating your PteroCA installation has never been easier. Simply run the following command inside your project directory:

php bin/console app:update-system

This command automates the most common update steps for you by:

  • Pulling the latest version of the code (if applicable).

  • Installing and updating dependencies (Composer, etc.).

  • Running any necessary database migrations.

  • Adjusting file permissions for your web server, if needed.

Optional: After running the update, you may also update the Pterodactyl plugin by following any specific instructions outlined in its documentation or by running the relevant update command.


Manual Update

Synchronizing Project Files

Ensure that your local repository is synchronized with the latest versions while preserving any local changes.

git stash            # Save local modifications
git pull             # Fetch and merge latest changes from the remote repository
git stash apply      # Reapply the stashed changes

Managing Project Dependencies

Regular updates to dependencies are critical for maintaining compatibility and performance. This includes removing development-only packages and optimizing the autoloader.

composer install --no-dev --optimize-autoloader    # Update and optimize production dependencies

Database Migration

To align your database schema with the latest project updates, perform a migration using the framework's built-in tools.

php bin/console doctrine:migration:migrate    # Execute new database migrations

Refreshing the Cache

Post-update, clearing the cache is essential to prevent old data from affecting the functionality of the updated system.

php bin/console cache:clear    # Clear system cache to ensure fresh data usage

Adjusting File Permissions

Correct file permissions are essential for secure and uninterrupted operation of the server environment, especially after updates that might alter file structures.

# NGINX or Apache on Ubuntu/Debian (or similar):
chown -R www-data:www-data /var/www/pteroca/var/ /var/www/pteroca/public/uploads/

# NGINX on CentOS:
chown -R nginx:nginx /var/www/pteroca/var/ /var/www/pteroca/public/uploads/

# Apache on CentOS:
chown -R apache:apache /var/www/pteroca/var/ /var/www/pteroca/public/uploads/

Updating Pterodactyl Plugin (Optional)

If you have installed the PteroCA Plugin for Pterodactyl, you may want to update it as well.

Navigate to your Pterodactyl directory and simply run the following command to update the Composer package:

composer update pteroca-com/pterodactyl-addon

This command will update the PteroCA Plugin package and ensure that everything continues to work smoothly.


Need help? Join our Discord!

If you encounter any issues or need assistance, feel free to join our Discord community, where we’ll be happy to help! 🚀

🔗 Join here!

Last updated