Updating

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


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