<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>composer Archives | Clever Cloud</title>
	<atom:link href="https://www.clever.cloud/blog/tag/composer/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.clever.cloud/blog/tag/composer/</link>
	<description>From Code to Product</description>
	<lastBuildDate>Tue, 30 Jan 2024 14:55:01 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://cdn.clever-cloud.com/uploads/2023/03/cropped-cropped-favicon-32x32.png</url>
	<title>composer Archives | Clever Cloud</title>
	<link>https://www.clever.cloud/blog/tag/composer/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Cloud hosted WordPress with Composer like it&#8217;s 2024</title>
		<link>https://www.clever.cloud/blog/features/2024/01/08/wordpress-cloud-2024/</link>
		
		<dc:creator><![CDATA[Julia March]]></dc:creator>
		<pubDate>Mon, 08 Jan 2024 11:11:06 +0000</pubDate>
				<category><![CDATA[Features]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://www.clever-cloud.com/?p=7554</guid>

					<description><![CDATA[<p><img width="1076" height="415" src="https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="wp composer 1" decoding="async" fetchpriority="high" srcset="https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1.png 1076w, https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1-768x296.png 768w" sizes="(max-width: 1076px) 100vw, 1076px" /></p><!-- wp:paragraph -->
<p>Devastating news for Wordpress haters: with a clean, secure, and modern file structure, you can easily migrate it to Clever Cloud. All of this is possible using the tools described in this post.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For those who have never used Git before, we will also cover how to deploy a WordPress installation on Clever Cloud in this post. If you want to give it a try, we'll walk you through the steps. If you choose not to, our platform does offer a GitHub integration.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Requirements:</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>A&nbsp;<a href="https://www.clever.cloud" target="_blank" rel="noreferrer noopener">Clever Cloud</a>&nbsp;account</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Le <a href="https://github.com/CleverCloud/clever-wordpress" target="_blank" rel="noreferrer noopener">Bedrock's Composer</a>&nbsp;to deploy WordPress with Clever Cloud, that we have updated.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>A&nbsp;<a href="https://github.com" target="_blank" rel="noreferrer noopener">GitHub</a>&nbsp;account if you deploy the code from it, <strong>or</strong>&nbsp;<a href="https://git-scm.com" target="_blank" rel="noreferrer noopener">Git </a>&nbsp;installed on your computer, if you choose this method.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deployment and WorpdPress configuration</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Composer will deploy a WordPress site in a matter of minutes, creating a rapid, light, and secure framework for our new website.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Follow the instructions below:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">1. Get the code</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The code can be found in its &nbsp;<a href="https://github.com/CleverCloud/clever-wordpress" target="_blank" rel="noreferrer noopener">"WordPress + Bedrock"</a> . public repository. It has a WordPress architecture that works with Composer. There are two ways to download it: directly from Git or GitHub (the easier choice if you don't feel comfortable using command lines).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Take this post as an opportunity to learn more about command lines on a Terminal and Git, even if you aren't accustomed to them. No worries, by following our directions, you will be able to use this method..</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Option A : Using GitHub</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you really don't want to use Git, simply fork the code and deploy from GitHub on Clever Cloud. Creating a fork will duplicate the code in your own repository.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7536,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/github-fork.png" alt="" class="wp-image-7536"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Open the&nbsp;<a href="https://console.clever-cloud.com" target="_blank" rel="noreferrer noopener">Clever Cloud Console</a>&nbsp;settings, clic on &nbsp;"Profile" and link your GitHub account, if you haven't done it already. That's all, now go directly to step 2.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Option B: Using Git, step by step</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The other option is to download the code to your computer (locally). If that's your first time, here are the instructions:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Set up</h5>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You must first grant permission for your computer to push code to Clever Cloud before you can proceed. You must create and add an SSH key to your console if you haven't already. Go directly to the next step if it has already been completed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Open your Terminal and:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>type&nbsp;<code>ssh-keygen -t ed25519 -C "[votre@email.ici]</code>&nbsp;the email must be the same you use to log into Clever Cloud.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>When the Terminal asks you in which file you wish to add the key, juste press "Enter". </li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Add a password</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Copy the key content using &nbsp;<code>pbcopy &lt; ~/.ssh/id_[rsa].pub</code> (replace&nbsp;<code>[rsa]</code>&nbsp;by your key id, of course))</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Open the Clever Cloud Console and go to Profile&gt;SSH keys&gt;Add and paste your key's content.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Your machine is now connected to your Clever Cloud account and ready to push code.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Clone the code</h5>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Make a&nbsp;<code>sites</code>&nbsp;directory on your computer. It will contait your apps and your websites.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Open your terminal and type&nbsp;<code>cd sites</code>, this will open your "sites" directory.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Still in your terminal, copy-paste&nbsp;<code>git clone git@github.com:CleverCloud/clever-wordpress.git'</code></li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>The code has been downloaded to your computer, inside the&nbsp;<code>sites</code>directory, you'll see a a new&nbsp;<code>clever-wordpress</code>&nbsp;directory. Open it (<code>cd clever-wordpress</code>) et type&nbsp;<code class="lang-shell">ls -a</code> : you'll see all the files and directories it contains.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you just used Git and your Terminal for the first time, you'll find more tutorials and explanations on the Internet. Our teammate David Legrand happens to publish great stuff I &nbsp;<a href="https://www.nextinpact.com/article/43792/apprenez-a-utiliser-git-bases-pour-suivre-evolution-dun-document" target="_blank" rel="noreferrer noopener">greta stuff in French.</a></p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">2. Declare the app on Clever Cloud</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Click "Create" and "An application" from the Clever Cloud Console. After choosing your fork, you can create a new PHP app if you are using GitHub integration. All that remains is for the code to be pushed from GitHub. If you're using Git, the identical procedure can be carried out by entering a short command line.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The Console will ask if you need any add-on, choose a <strong>MySQL database</strong> and proceed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Edit your PHP app <strong>environment variables</strong>&nbsp;in expert mode and past the salts generated on sur <a href="https://cdn.roots.io/salts.html" target="_blank" rel="noreferrer noopener">this page</a> (don't forget to save &nbsp;changes!)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7533,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/variables-environnement.png" alt="Expert mode on Clever Cloud Environnement variables page" class="wp-image-7533"/></figure>
<!-- /wp:image -->

<!-- wp:list {"ordered":true,"start":6} -->
<ol start="6"><!-- wp:list-item -->
<li>Add 3 additional environment variables:<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><code>WP_ENV</code> with value&nbsp;<code>production</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><code>WP_HOME</code>&nbsp;with value&nbsp;<code>https://yourdomain.tld</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><code>WP_SITEURL</code>&nbsp;with value&nbsp;<code>https://your-domain.tld/wp</code></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:image {"id":7534,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/variables-simple.png" alt="Simple mode on environment variables from the Clever Cloud Console" class="wp-image-7534"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>The Console will provide you with command lines to copy-paste in your Terminal in order to send your code to your new instance, unless you've decided to work with the GitHub integration. The deployment will begin once you've completed this.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While the deployment starts,&nbsp;<strong>create an Cellar addon</strong>&nbsp;and link it to your app (clic on your PHP app, then choose "Linked dependencies" to connect it).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>From the&nbsp;<strong>Cellar</strong> set up page, create&nbsp;<strong>a bucket</strong> and give it a name.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Go back to your PHP app and add the following&nbsp;<strong>environment variable</strong>:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><code>CELLAR_ADDON_BUCKET</code>&nbsp;with the name of your bucket as value.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Tip : You can easily configure a custom domain for your bucket. Check &nbsp;<a href="https://www.clever.cloud/developers/deploy/addon/cellar/#using-a-custom-domain" target="_blank" rel="noreferrer noopener">the doc</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Restart your app to incorporate last changes.

Don't forget to set up your domain for the WP_HOME variable (or with a .cleveapps.io for testing purposes).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When you'll visit your website, the installation page from WordPress will then appear (you'll find de database credentials in the Console, either by clicking on the addon, either in your app's environment variables). Once you are logged into WordPress, go to your plugins page and activate&nbsp;<strong>S3 Uploads</strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>That's it. You now have a hosted WordPress on Clever Cloud. Your files and medias will be stored in the Cellar's bucket.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Add a plugin by a single command</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The&nbsp;<code>composer.json</code>&nbsp;file reflects the WordPress themes and plugins directory; you just have to specify what it should reflect. <strong>You don't need to host the plugin directory in your app </strong>to add a new plugin to your site<strong>.</strong> You'll use&nbsp;<a href="https://wpackagist.org">Wpackagist</a>&nbsp;to find and add the plugin's references to&nbsp;<code>composer.json</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Find&nbsp;<code>require</code> , this is where the plugins are specified.</p>
<!-- /wp:paragraph -->

<!-- wp:code {"className":"lang-json"} -->
<pre class="wp-block-code lang-json"><code>"require": 
//Here are your further plugins declarations. Add this line wherever you'd like (update the version if necessary)
"wpackagist-plugin/&#91;plugin]": "&#91;version]",</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>You'll find all your favorite plugins on&nbsp;<a href="https://wpackagist.org">Wpackagist</a>&nbsp;to add them to the file. Commit changes (with Git : <code>git add .</code>&nbsp; et <code>git commit -m "un-message"</code>) and push the modified code to Clever Cloud (on GitHub, this action will be done automatically). Wait until your app has redeployed, then go top your WordPress dashboard and activate the plugins you just added.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Welcome aboard!!</p>
<!-- /wp:paragraph -->]]></description>
										<content:encoded><![CDATA[<p><img width="1076" height="415" src="https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="wp composer 1" decoding="async" srcset="https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1.png 1076w, https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1-300x116.png 300w, https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1-1024x395.png 1024w, https://cdn.clever-cloud.com/uploads/2022/08/wp-composer-1-768x296.png 768w" sizes="(max-width: 1076px) 100vw, 1076px" /></p><!-- wp:paragraph -->
<p>Devastating news for Wordpress haters: with a clean, secure, and modern file structure, you can easily migrate it to Clever Cloud. All of this is possible using the tools described in this post.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For those who have never used Git before, we will also cover how to deploy a WordPress installation on Clever Cloud in this post. If you want to give it a try, we'll walk you through the steps. If you choose not to, our platform does offer a GitHub integration.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Requirements:</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>A&nbsp;<a href="https://www.clever.cloud" target="_blank" rel="noreferrer noopener">Clever Cloud</a>&nbsp;account</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Le <a href="https://github.com/CleverCloud/clever-wordpress" target="_blank" rel="noreferrer noopener">Bedrock's Composer</a>&nbsp;to deploy WordPress with Clever Cloud, that we have updated.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>A&nbsp;<a href="https://github.com" target="_blank" rel="noreferrer noopener">GitHub</a>&nbsp;account if you deploy the code from it, <strong>or</strong>&nbsp;<a href="https://git-scm.com" target="_blank" rel="noreferrer noopener">Git </a>&nbsp;installed on your computer, if you choose this method.</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Deployment and WorpdPress configuration</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Composer will deploy a WordPress site in a matter of minutes, creating a rapid, light, and secure framework for our new website.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Follow the instructions below:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">1. Get the code</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The code can be found in its &nbsp;<a href="https://github.com/CleverCloud/clever-wordpress" target="_blank" rel="noreferrer noopener">"WordPress + Bedrock"</a> . public repository. It has a WordPress architecture that works with Composer. There are two ways to download it: directly from Git or GitHub (the easier choice if you don't feel comfortable using command lines).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Take this post as an opportunity to learn more about command lines on a Terminal and Git, even if you aren't accustomed to them. No worries, by following our directions, you will be able to use this method..</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Option A : Using GitHub</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>If you really don't want to use Git, simply fork the code and deploy from GitHub on Clever Cloud. Creating a fork will duplicate the code in your own repository.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7536,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/github-fork.png" alt="" class="wp-image-7536"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Open the&nbsp;<a href="https://console.clever-cloud.com" target="_blank" rel="noreferrer noopener">Clever Cloud Console</a>&nbsp;settings, clic on &nbsp;"Profile" and link your GitHub account, if you haven't done it already. That's all, now go directly to step 2.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4 class="wp-block-heading">Option B: Using Git, step by step</h4>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The other option is to download the code to your computer (locally). If that's your first time, here are the instructions:</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Set up</h5>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>You must first grant permission for your computer to push code to Clever Cloud before you can proceed. You must create and add an SSH key to your console if you haven't already. Go directly to the next step if it has already been completed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Open your Terminal and:</p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>type&nbsp;<code>ssh-keygen -t ed25519 -C "[votre@email.ici]</code>&nbsp;the email must be the same you use to log into Clever Cloud.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>When the Terminal asks you in which file you wish to add the key, juste press "Enter". </li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Add a password</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Copy the key content using &nbsp;<code>pbcopy &lt; ~/.ssh/id_[rsa].pub</code> (replace&nbsp;<code>[rsa]</code>&nbsp;by your key id, of course))</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Open the Clever Cloud Console and go to Profile&gt;SSH keys&gt;Add and paste your key's content.</li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>Your machine is now connected to your Clever Cloud account and ready to push code.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":5} -->
<h5 class="wp-block-heading">Clone the code</h5>
<!-- /wp:heading -->

<!-- wp:list {"ordered":true} -->
<ol><!-- wp:list-item -->
<li>Make a&nbsp;<code>sites</code>&nbsp;directory on your computer. It will contait your apps and your websites.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Open your terminal and type&nbsp;<code>cd sites</code>, this will open your "sites" directory.</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Still in your terminal, copy-paste&nbsp;<code>git clone git@github.com:CleverCloud/clever-wordpress.git'</code></li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:paragraph -->
<p>The code has been downloaded to your computer, inside the&nbsp;<code>sites</code>directory, you'll see a a new&nbsp;<code>clever-wordpress</code>&nbsp;directory. Open it (<code>cd clever-wordpress</code>) et type&nbsp;<code class="lang-shell">ls -a</code> : you'll see all the files and directories it contains.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you just used Git and your Terminal for the first time, you'll find more tutorials and explanations on the Internet. Our teammate David Legrand happens to publish great stuff I &nbsp;<a href="https://www.nextinpact.com/article/43792/apprenez-a-utiliser-git-bases-pour-suivre-evolution-dun-document" target="_blank" rel="noreferrer noopener">greta stuff in French.</a></p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading">2. Declare the app on Clever Cloud</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Click "Create" and "An application" from the Clever Cloud Console. After choosing your fork, you can create a new PHP app if you are using GitHub integration. All that remains is for the code to be pushed from GitHub. If you're using Git, the identical procedure can be carried out by entering a short command line.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The Console will ask if you need any add-on, choose a <strong>MySQL database</strong> and proceed.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Edit your PHP app <strong>environment variables</strong>&nbsp;in expert mode and past the salts generated on sur <a href="https://cdn.roots.io/salts.html" target="_blank" rel="noreferrer noopener">this page</a> (don't forget to save &nbsp;changes!)</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":7533,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/variables-environnement.png" alt="Expert mode on Clever Cloud Environnement variables page" class="wp-image-7533"/></figure>
<!-- /wp:image -->

<!-- wp:list {"ordered":true,"start":6} -->
<ol start="6"><!-- wp:list-item -->
<li>Add 3 additional environment variables:<!-- wp:list -->
<ul><!-- wp:list-item -->
<li><code>WP_ENV</code> with value&nbsp;<code>production</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><code>WP_HOME</code>&nbsp;with value&nbsp;<code>https://yourdomain.tld</code></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li><code>WP_SITEURL</code>&nbsp;with value&nbsp;<code>https://your-domain.tld/wp</code></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></li>
<!-- /wp:list-item --></ol>
<!-- /wp:list -->

<!-- wp:image {"id":7534,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cdn.clever-cloud.com/uploads/2022/09/variables-simple.png" alt="Simple mode on environment variables from the Clever Cloud Console" class="wp-image-7534"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>The Console will provide you with command lines to copy-paste in your Terminal in order to send your code to your new instance, unless you've decided to work with the GitHub integration. The deployment will begin once you've completed this.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>While the deployment starts,&nbsp;<strong>create an Cellar addon</strong>&nbsp;and link it to your app (clic on your PHP app, then choose "Linked dependencies" to connect it).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>From the&nbsp;<strong>Cellar</strong> set up page, create&nbsp;<strong>a bucket</strong> and give it a name.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Go back to your PHP app and add the following&nbsp;<strong>environment variable</strong>:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><code>CELLAR_ADDON_BUCKET</code>&nbsp;with the name of your bucket as value.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Tip : You can easily configure a custom domain for your bucket. Check &nbsp;<a href="https://www.clever.cloud/developers/deploy/addon/cellar/#using-a-custom-domain" target="_blank" rel="noreferrer noopener">the doc</a>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Restart your app to incorporate last changes.

Don't forget to set up your domain for the WP_HOME variable (or with a .cleveapps.io for testing purposes).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When you'll visit your website, the installation page from WordPress will then appear (you'll find de database credentials in the Console, either by clicking on the addon, either in your app's environment variables). Once you are logged into WordPress, go to your plugins page and activate&nbsp;<strong>S3 Uploads</strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>That's it. You now have a hosted WordPress on Clever Cloud. Your files and medias will be stored in the Cellar's bucket.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2 class="wp-block-heading">Add a plugin by a single command</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The&nbsp;<code>composer.json</code>&nbsp;file reflects the WordPress themes and plugins directory; you just have to specify what it should reflect. <strong>You don't need to host the plugin directory in your app </strong>to add a new plugin to your site<strong>.</strong> You'll use&nbsp;<a href="https://wpackagist.org">Wpackagist</a>&nbsp;to find and add the plugin's references to&nbsp;<code>composer.json</code>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Find&nbsp;<code>require</code> , this is where the plugins are specified.</p>
<!-- /wp:paragraph -->

<!-- wp:code {"className":"lang-json"} -->
<pre class="wp-block-code lang-json"><code>"require": 
//Here are your further plugins declarations. Add this line wherever you'd like (update the version if necessary)
"wpackagist-plugin/&#91;plugin]": "&#91;version]",</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>You'll find all your favorite plugins on&nbsp;<a href="https://wpackagist.org">Wpackagist</a>&nbsp;to add them to the file. Commit changes (with Git : <code>git add .</code>&nbsp; et <code>git commit -m "un-message"</code>) and push the modified code to Clever Cloud (on GitHub, this action will be done automatically). Wait until your app has redeployed, then go top your WordPress dashboard and activate the plugins you just added.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Welcome aboard!!</p>
<!-- /wp:paragraph -->]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
