Updating

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

Please note, this project is currently in an early version (0.x.x) and may contain bugs. Use it at your own risk.

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/

Last updated