Deploy Your Raydium Site
Deploying a Raydium-powered WordPress site involves several considerations, tailored to accommodate Raydium's unique structure and dependencies, including Composer management:
- Your project, inclusive of Raydium and WordPress, resides in the root directory, with
public
serving as the web root containing thepublic/wp-content
directory for WordPress themes, plugins, and uploads. - The
vendor
directory and.env
file, essential for Raydium and WordPress configurations, are located outside the web root for enhanced security. - Key deployment scripts are defined in your
composer.json
, facilitating tasks such as dependency installation and environment setup.
Build and Test Locally
To ensure a smooth deployment, thoroughly test your site in a local environment:
Confirm that your local server is configured to serve the
public
directory as the web root.Conduct a comprehensive review of your site's functionality, including themes, plugins, and custom content, to ensure everything operates as intended.
While WordPress dynamically renders pages, ensure any asset build processes (for custom themes or plugins) are executed, and the resulting assets are correctly placed within the
public/content
directory.Run Composer to install or update dependencies, ensuring compatibility and functionality:
shcomposer install
Setting a Public Base Path
For sites served from a subdirectory (e.g., https://yourdomain.com/blog
), adjust the WP_HOME
and WP_SITEURL
in your .env
file:
WP_HOME='https://yourdomain.com/blog'
WP_SITEURL="${WP_HOME}/wp"
This adjustment is needed for WordPress to generate accurate URLs for assets and pages.
Platform Guides
General Web Hosting (Shared, VPS, Dedicated)
For traditional web hosting platforms:
Upload your entire project, excluding the
vendor
directory. Ensure thepublic
directory is set as the web root.Run Composer on the server (if supported) to install dependencies:
shcomposer install --no-dev --optimize-autoloader
Migrate your database if moving from a different environment. Update the
.env
environment file with production environment settings.
Managed WordPress Hosting
For managed WordPress hosting that supports Composer:
Check if your host supports Git-based deployments or direct Composer usage on the server.
Deploy your project via Git or other supported methods, ensuring the
public
directory aligns with the web root configuration.Use SSH or hosting tools to run Composer on the server, installing necessary PHP dependencies.
Cloud Platforms (AWS, Google Cloud, Azure)
Cloud platforms offer flexibility for deploying Composer-managed WordPress sites:
Choose a suitable service (e.g., VM instances, container services) that supports custom configurations and Composer.
Configure the service to set the
public
directory as the web root and secure thevendor
and.env
files outside the web root.Utilize cloud-based CI/CD pipelines to automate deployments, including Composer dependency installations and environment configurations.
What's Next?
- Post-deployment, actively monitor your site's performance and security, adjusting configurations as necessary.
- Evaluate CDN integration for further performance enhancements, especially for global audiences.
- Regularly update WordPress core, plugins, themes, and Composer dependencies to ensure ongoing site integrity and performance.