{"id":41705,"date":"2024-05-20T13:58:14","date_gmt":"2024-05-20T13:58:14","guid":{"rendered":"https:\/\/accuweb.cloud\/resource\/?post_type=faq&#038;p=41705"},"modified":"2026-02-19T05:21:54","modified_gmt":"2026-02-19T05:21:54","slug":"capistrano","status":"publish","type":"faq","link":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano","title":{"rendered":"Capistrano"},"content":{"rendered":"<h2 class=\"ack-h2\">Capistrano<\/h2>\n<p>Capistrano is a free tool for running scripts on servers from the remote server. Usually, it&#8217;s used to put apps onto servers using a secure connection called SSH. Capistrano is made in <a class=\"ack-link-color\" href=\"https:\/\/accuweb.cloud\/application\/ruby-hosting\" target=\"_blank\" rel=\"noopener\">Ruby<\/a> and is a part of the Ruby on Rails system, so it&#8217;s often used to put Ruby apps on servers. But it can also work with other languages, like PHP.<\/p>\n<p>So, in this guide, we&#8217;ll learn how to put a PHP app on a server using Capistrano. First, you&#8217;ll need:<\/p>\n<ul class=\"ack-ul\">\n<li>A place where PHP can run, like an Apache server.<\/li>\n<li>A special key for connecting securely called an SSH public key. You make this and add it to your system.<\/li>\n<li>Your PHP app is stored in a place called a GIT repository. Right now, Capistrano 3 only works with GIT.<\/li>\n<li>A copy of your PHP project on your computer.<\/li>\n<\/ul>\n<p>Let&#8217;s start!<\/p>\n<div class=\"ack-formula\"><strong>Remember:<\/strong> Do these commands on your own computer, using the same user you used when you made your SSH key. This way, you&#8217;ll avoid any problems with permissions or connections.<\/div>\n<div class=\"article-space\"><\/div>\n<h2 class=\"ack-h2\">Install Capistrano<\/h2>\n<p>To install Capistrano, follow these steps:<\/p>\n<p><strong>Step 1:<\/strong> First, make sure you have Ruby installed on your computer. You can do this by running this command:<\/p>\n<pre><code class=\"language-javascript\">\r\n# apt-get install ruby rubygems<\/code><\/pre>\n<div class=\"article-extra-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Ruby-running-status-1.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-41864 size-full\" title=\"Ruby running status\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Ruby-running-status-1.png\" alt=\"Ruby running status\" width=\"863\" height=\"592\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Ruby-running-status-1.png 863w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Ruby-running-status-1-300x206.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Ruby-running-status-1-768x527.png 768w\" sizes=\"(max-width: 863px) 100vw, 863px\" \/><\/a><\/p>\n<p><strong>Step 2:<\/strong> Next, install Capistrano itself. Just type this command:<\/p>\n<pre><code class=\"language-javascript\">\r\n# gem install capistrano<\/code><\/pre>\n<div class=\"article-extra-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Install-Capistrano-1.png\"><img decoding=\"async\" class=\"aligncenter wp-image-41865 size-full\" title=\"Install Capistrano\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Install-Capistrano-1.png\" alt=\"Install Capistrano\" width=\"864\" height=\"682\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Install-Capistrano-1.png 864w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Install-Capistrano-1-300x237.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Install-Capistrano-1-768x606.png 768w\" sizes=\"(max-width: 864px) 100vw, 864px\" \/><\/a><\/p>\n<p><strong>Step 3:<\/strong> Check if you have a folder named &#8220;<strong>config<\/strong>&#8221; in the directory where your project is stored. This folder is usually there by default for Ruby on Rails projects. If it&#8217;s not there, create it using this command:<\/p>\n<pre><code class=\"language-javascript\">\r\n# mkdir {path_to_your_project}\/config<\/code><\/pre>\n<div class=\"article-extra-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Config-folder-1.png\"><img decoding=\"async\" class=\"ack-article-image aligncenter wp-image-41866 size-full\" title=\"Config folder\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Config-folder-1.png\" alt=\"Config folder\" width=\"870\" height=\"174\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Config-folder-1.png 870w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Config-folder-1-300x60.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Config-folder-1-768x154.png 768w\" sizes=\"(max-width: 870px) 100vw, 870px\" \/><\/a><\/p>\n<p>That&#8217;s it! Now you&#8217;re ready to use Capistrano.<\/p>\n<div class=\"article-space\"><\/div>\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t\n<div class=\"article-space\"><\/div>\n<h2 class=\"ack-h2\">Prepare Your Application for Capistrano<\/h2>\n<p>Once you&#8217;ve installed Capistrano, you&#8217;ll need to set it up for your application. This process is called &#8220;<strong>capifying<\/strong>&#8221; your app. To do this, go to the main folder of your PHP project on your computer and run this command:<\/p>\n<pre><code class=\"language-javascript\">\r\n# cap install<\/code><\/pre>\n<div class=\"article-extra-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Copifying-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-41867 size-full\" title=\"Copifying\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Copifying-1.png\" alt=\"Copifying\" width=\"893\" height=\"274\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Copifying-1.png 893w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Copifying-1-300x92.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Copifying-1-768x236.png 768w\" sizes=\"(max-width: 893px) 100vw, 893px\" \/><\/a><\/p>\n<p>This will add some new files and folders to your project:<\/p>\n<ul class=\"ack-ul\">\n<li><strong>Capfile:<\/strong> This is the main file for Capistrano. It handles important settings and tasks for deployment.<\/li>\n<li><strong>config\/deploy\/:<\/strong> This folder contains two files, &#8220;staging.rb&#8221; and &#8220;production.rb,&#8221; which are used for configuring deployment settings for different environments.<\/li>\n<li><strong>config\/deploy.rb:<\/strong> This is a Ruby script that holds your application&#8217;s configurations and instructions for Capistrano.<\/li>\n<li><strong>lib\/capistrano\/tasks\/:<\/strong> Here, you can add your own custom tasks for Capistrano.<\/li>\n<\/ul>\n<h2 class=\"ack-h2\">Customize Your Settings<\/h2>\n<p>To make your Capistrano setup work for your project, you&#8217;ll need to adjust some configurations. Here&#8217;s what you need to do:<\/p>\n<p><strong>1.<\/strong> Go to the &#8220;<strong>config\/deploy.rb<\/strong>&#8221; file in your project folder. Edit the file according to your project&#8217;s specifics. Initially, it will look something like this:<\/p>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Customize-settings-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41868 size-full\" title=\"Customize settings\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Customize-settings-1.png\" alt=\"Customize settings\" width=\"894\" height=\"922\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Customize-settings-1.png 894w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Customize-settings-1-291x300.png 291w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Customize-settings-1-768x792.png 768w\" sizes=\"(max-width: 894px) 100vw, 894px\" \/><\/a><\/p>\n<p>You can change settings like the application name, repository URL, deployment directory, and more to fit your project&#8217;s needs.<\/p>\n<p><strong>Make these changes in the file:<\/strong><\/p>\n<ul class=\"ack-ul\">\n<li>Give your application a name:<\/li>\n<\/ul>\n<pre><code class=\"language-javascript\">\r\nset :application, \"my_app_name\"<\/code><\/pre>\n<ul class=\"ack-ul\">\n<li>Tell where your PHP code is stored in the repository:<\/li>\n<\/ul>\n<pre><code class=\"language-javascript\">\r\nset :repo_url, \"git@example.net:me\/my_repo.git\"<\/code><\/pre>\n<div class=\"ack-formula\">\n<p><strong>Remember:<\/strong> Make sure your GIT account has an SSH public key attached to it. This is the same key you added to your platform dashboard. If you don&#8217;t have this, you&#8217;ll see a &#8220;Permission denied&#8221; error when deploying your app.Alternatively, you can use an HTTPS link like this:<\/p>\n<pre><code class=\"language-javascript\">\r\nset :repo_url, \"https:\/\/example.net\/GIT_user_name\/repo_name.git\"<\/code><\/pre>\n<p>With HTTPS, you don&#8217;t need to authenticate, so you can use it to link to any PHP open-source repository you want to deploy.<\/p>\n<\/div>\n<div class=\"article-space\"><\/div>\n<ul class=\"ack-ul\">\n<li>Uncomment and set the deployment directory:<\/li>\n<\/ul>\n<pre><code class=\"language-javascript\">\r\n# set :deploy_to, '\/var\/www\/webroot'<\/code><\/pre>\n<ul class=\"ack-ul\">\n<li>Uncomment and set these lines as well:<\/li>\n<\/ul>\n<pre><code class=\"language-javascript\">\r\nset :scm, :git\r\nset :format, :pretty\r\nset :pty, true<\/code><\/pre>\n<div class=\"article-extra-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Specific-changes-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41869 size-full\" title=\"Specific changes\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Specific-changes-1.png\" alt=\"Specific changes\" width=\"813\" height=\"865\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Specific-changes-1.png 813w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Specific-changes-1-282x300.png 282w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Specific-changes-1-768x817.png 768w\" sizes=\"(max-width: 813px) 100vw, 813px\" \/><\/a><\/p>\n<ul class=\"ack-ul\">\n<li>Replace the tasks at the end of the file with these:<\/li>\n<\/ul>\n<pre><code class=\"language-javascript\">\r\nnamespace :deploy do\r\ndesc 'Restart Apache'\r\ntask :apache do\r\non roles(:app) do\r\nexecute :sudo, \"service httpd restart\"\r\nend\r\nend\r\n\r\ndesc 'Creating symlink'\r\ntask :symlink do\r\non roles(:app) do\r\nexecute :rm, \"-rf \/var\/www\/webroot\/ROOT\"\r\nexecute :ln, \"-s \/var\/www\/webroot\/current \/var\/www\/webroot\/ROOT\"\r\nend\r\nend\r\n\r\ndesc 'Restart Apache and create symlink'\r\ntask :restart do\r\nbefore :restart, :symlink\r\nbefore :restart, :apache\r\nend\r\nend\r\n\r\nafter 'deploy:publishing', 'deploy:restart'<\/code><\/pre>\n<div class=\"article-extra-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Replace-the-tasks-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41870 size-full\" title=\"Replace the tasks\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Replace-the-tasks-1.png\" alt=\"Replace the tasks\" width=\"812\" height=\"1014\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Replace-the-tasks-1.png 812w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Replace-the-tasks-1-240x300.png 240w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Replace-the-tasks-1-768x959.png 768w\" sizes=\"(max-width: 812px) 100vw, 812px\" \/><\/a><\/p>\n<p>You can also adjust other settings in this file if needed, like specifying a branch or linking more files or folders.<\/p>\n<p>Remember to save your changes once you&#8217;re done.<\/p>\n<p><strong>2.<\/strong> Next, go to the &#8220;<strong>config\/deploy\/staging.rb<\/strong>&#8221; file.<\/p>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Staging.rb-file-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-41871 size-full\" title=\"Staging.rb file\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Staging.rb-file-1.png\" alt=\"Staging.rb file\" width=\"814\" height=\"124\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Staging.rb-file-1.png 814w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Staging.rb-file-1-300x46.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Staging.rb-file-1-768x117.png 768w\" sizes=\"(max-width: 814px) 100vw, 814px\" \/><\/a><\/p>\n<p>First, change three lines in the Simple Role Syntax section by replacing {deploy@example.com} with {nodeid-uid@your.SSH.host}. Here&#8217;s what to do:<\/p>\n<ul class=\"ack-ul\">\n<li>For &#8220;<strong>nodeid<\/strong>,&#8221; use the node ID of your Apache application server container.<\/li>\n<li>For &#8220;<strong>uid<\/strong>,&#8221; use the number before the @ symbol in your SSH connection string.<\/li>\n<\/ul>\n<p>After that, update the server settings line in the Extended Server Syntax section. Here are the steps:<\/p>\n<ul class=\"ack-ul\">\n<li>Specify your SSH host, like &#8220;gate.cp-accuweb.cloud&#8221;.<\/li>\n<li>Set the user parameter to {nodeid}_{uid}, for example, user: &#8216;190403-136&#8217;.<\/li>\n<\/ul>\n<p>This way, your server settings line will look like this:<\/p>\n<pre><code class=\"language-javascript\">\r\n# server 'gate.cp-accuweb.cloud', user: '190403-136', roles: %w{web app}, my_property: :my_value<\/code><\/pre>\n<p>Lastly, define the server port to be used for the SSH connection.<\/p>\n<pre><code class=\"language-javascript\">\r\nset :ssh_options, {\r\nport: 3022\r\n}<\/code><\/pre>\n<p>Save your changes.<\/p>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Define-server-port-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41872 size-full\" title=\"Define server port\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Define-server-port-1.png\" alt=\"Define server port\" width=\"980\" height=\"1026\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Define-server-port-1.png 980w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Define-server-port-1-287x300.png 287w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Define-server-port-1-978x1024.png 978w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Define-server-port-1-768x804.png 768w\" sizes=\"(max-width: 980px) 100vw, 980px\" \/><\/a><\/p>\n<p>3. In the &#8220;<strong>Capfile<\/strong>&#8221; located in your project&#8217;s root folder, add this line:<\/p>\n<pre><code class=\"language-javascript\">\r\nRake::Task[:staging].invoke<\/code><\/pre>\n<p>Save the &#8220;<strong>Capfile<\/strong>&#8221; after making this addition.<\/p>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Capfile-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41873 size-full\" title=\"Capfile\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Capfile-1.png\" alt=\"Capfile\" width=\"982\" height=\"879\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Capfile-1.png 982w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Capfile-1-300x269.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Capfile-1-768x687.png 768w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/a><\/p>\n<h2 class=\"ack-h2\">Set Up SSH Agent<\/h2>\n<p>1. Make sure your ssh-agent is active on your computer.<\/p>\n<p>2. Add your private SSH key to the agent. It must match the public key you added to the dashboard.<\/p>\n<pre><code class=\"language-javascript\">\r\n# ssh-add {full_path_to_the_private_SSH_key}<\/code><\/pre>\n<div class=\"article-extra-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Setup-SSH-agent-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"ack-article-image aligncenter wp-image-41874 size-full\" title=\"Setup SSH agent\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Setup-SSH-agent-1.png\" alt=\"Setup SSH agent\" width=\"822\" height=\"222\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Setup-SSH-agent-1.png 822w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Setup-SSH-agent-1-300x81.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Setup-SSH-agent-1-768x207.png 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/a><\/p>\n<p>3. You can double-check if the correct key was added by typing:<\/p>\n<pre><code class=\"language-javascript\">\r\n# ssh-add -l<\/code><\/pre>\n<h2 class=\"ack-h2\">Check Your Settings<\/h2>\n<p>Now, let&#8217;s verify if everything is set correctly.<\/p>\n<p>Go to the main folder of your project on your computer and run this command:<\/p>\n<pre><code class=\"language-javascript\">\r\ncap staging deploy:check<\/code><\/pre>\n<div class=\"article-extra-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Check-your-settings-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41875 size-full\" title=\"Check your settings\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Check-your-settings-1.png\" alt=\"Check your settings\" width=\"843\" height=\"821\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Check-your-settings-1.png 843w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Check-your-settings-1-300x292.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Check-your-settings-1-768x748.png 768w\" sizes=\"(max-width: 843px) 100vw, 843px\" \/><\/a><\/p>\n<p>Capistrano will connect to your server, create necessary folders, and check for all required files and permissions. If anything is missing, you&#8217;ll get an error message.<\/p>\n<h2 class=\"ack-h2\">Deploy Your App<\/h2>\n<p>Finally, deploy your application by running this command in your project&#8217;s main folder:<\/p>\n<pre><code class=\"language-javascript\">\r\ncap staging deploy<\/code><\/pre>\n<div class=\"article-extra-space\"><\/div>\n<p><a href=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Deploy-app-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-41876 size-full\" title=\"Deploy app\" src=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Deploy-app-1.png\" alt=\"Deploy app\" width=\"832\" height=\"656\" srcset=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Deploy-app-1.png 832w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Deploy-app-1-300x237.png 300w, https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/05\/Deploy-app-1-768x606.png 768w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><\/a><\/p>\n<p>Once it&#8217;s done, visit your app&#8217;s URL to confirm that it&#8217;s been successfully deployed.<\/p>\n<div class=\"cta-btn-top-space\"><\/div>\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"38668\" class=\"elementor elementor-38668\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"elementor_library\">\n\t\t\t        <section class=\"elementor-section elementor-top-section elementor-element elementor-element-882321f elementor-section-boxed elementor-section-height-default elementor-section-height-default ct-header-fixed-none ct-row-max-none\" data-id=\"882321f\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n            \n                        <div class=\"elementor-container elementor-column-gap-default \">\n                    <div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7cc79cc\" data-id=\"7cc79cc\" data-element_type=\"column\">\n        <div class=\"elementor-widget-wrap elementor-element-populated\">\n                    \n        \t\t<div class=\"elementor-element elementor-element-e31b40f elementor-widget elementor-widget-shortcode\" data-id=\"e31b40f\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t            <\/div>\n        <\/div>\n                    <\/div>\n        <\/section>\n        \t\t<\/div>\n\t\t\n<div class=\"cta-btn-mob-space\"><\/div>\n","protected":false},"author":1,"featured_media":52879,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","class_list":["post-41705","faq","type-faq","status-publish","has-post-thumbnail","hentry","faq_topics-capistrano","faq_topics-development-tools","faq_topics-kb","faq_topics-product-documentation","faq_topics-ssh"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.10 (Yoast SEO v24.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Deploy apps with Capistrano | AccuWeb.Cloud Guide<\/title>\n<meta name=\"description\" content=\"Discover how to deploy PHP applications with ease using Capistrano. Follow this step-by-step guide for seamless server deployment.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Capistrano\" \/>\n<meta property=\"og:description\" content=\"Discover how to deploy PHP applications with ease using Capistrano. Follow this step-by-step guide for seamless server deployment.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano\" \/>\n<meta property=\"og:site_name\" content=\"AccuWeb Cloud\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-19T05:21:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#article\",\"isPartOf\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano\"},\"author\":{\"name\":\"Jilesh Patadiya\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58\"},\"headline\":\"Capistrano\",\"datePublished\":\"2024-05-20T13:58:14+00:00\",\"dateModified\":\"2026-02-19T05:21:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano\"},\"wordCount\":890,\"publisher\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#organization\"},\"image\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#primaryimage\"},\"thumbnailUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"inLanguage\":\"en-US\"},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano\",\"url\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano\",\"name\":\"Deploy apps with Capistrano | AccuWeb.Cloud Guide\",\"isPartOf\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#primaryimage\"},\"image\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#primaryimage\"},\"thumbnailUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"datePublished\":\"2024-05-20T13:58:14+00:00\",\"dateModified\":\"2026-02-19T05:21:54+00:00\",\"description\":\"Discover how to deploy PHP applications with ease using Capistrano. Follow this step-by-step guide for seamless server deployment.\",\"breadcrumb\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#primaryimage\",\"url\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"contentUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/accuweb.cloud\/resource\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Capistrano\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#website\",\"url\":\"https:\/\/accuweb.cloud\/resource\/\",\"name\":\"AccuWeb Cloud\",\"description\":\"Cutting Edge Cloud Computing\",\"publisher\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/accuweb.cloud\/resource\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#organization\",\"name\":\"AccuWeb.Cloud\",\"url\":\"https:\/\/accuweb.cloud\/resource\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg\",\"contentUrl\":\"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg\",\"width\":156,\"height\":87,\"caption\":\"AccuWeb.Cloud\"},\"image\":{\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58\",\"name\":\"Jilesh Patadiya\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g\",\"caption\":\"Jilesh Patadiya\"},\"description\":\"Jilesh Patadiya, the visionary Co-Founder and Chief Technology Officer (CTO) behind AccuWeb.Cloud. Founder &amp; CTO at AccuWebHosting.com. He shares his web hosting insights on the AccuWeb.Cloud blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, and Windows and Linux hosting platforms.\",\"sameAs\":[\"https:\/\/accuweb.cloud\/resource\",\"https:\/\/www.facebook.com\/accuwebhosting\",\"https:\/\/www.instagram.com\/accuwebhosting\/\",\"https:\/\/www.linkedin.com\/company\/accuwebhosting\/\",\"https:\/\/x.com\/accuwebhosting\",\"https:\/\/www.youtube.com\/c\/Accuwebhosting\"],\"url\":\"https:\/\/accuweb.cloud\/resource\/author\/accuwebadmin\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Deploy apps with Capistrano | AccuWeb.Cloud Guide","description":"Discover how to deploy PHP applications with ease using Capistrano. Follow this step-by-step guide for seamless server deployment.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano","og_locale":"en_US","og_type":"article","og_title":"Capistrano","og_description":"Discover how to deploy PHP applications with ease using Capistrano. Follow this step-by-step guide for seamless server deployment.","og_url":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano","og_site_name":"AccuWeb Cloud","article_modified_time":"2026-02-19T05:21:54+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#article","isPartOf":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano"},"author":{"name":"Jilesh Patadiya","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58"},"headline":"Capistrano","datePublished":"2024-05-20T13:58:14+00:00","dateModified":"2026-02-19T05:21:54+00:00","mainEntityOfPage":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano"},"wordCount":890,"publisher":{"@id":"https:\/\/accuweb.cloud\/resource\/#organization"},"image":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#primaryimage"},"thumbnailUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","inLanguage":"en-US"},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano","url":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano","name":"Deploy apps with Capistrano | AccuWeb.Cloud Guide","isPartOf":{"@id":"https:\/\/accuweb.cloud\/resource\/#website"},"primaryImageOfPage":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#primaryimage"},"image":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#primaryimage"},"thumbnailUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","datePublished":"2024-05-20T13:58:14+00:00","dateModified":"2026-02-19T05:21:54+00:00","description":"Discover how to deploy PHP applications with ease using Capistrano. Follow this step-by-step guide for seamless server deployment.","breadcrumb":{"@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/accuweb.cloud\/resource\/articles\/capistrano"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#primaryimage","url":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","contentUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/07\/NEW-OG-IMAGE-URL.jpg","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/accuweb.cloud\/resource\/articles\/capistrano#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/accuweb.cloud\/resource\/"},{"@type":"ListItem","position":2,"name":"Capistrano"}]},{"@type":"WebSite","@id":"https:\/\/accuweb.cloud\/resource\/#website","url":"https:\/\/accuweb.cloud\/resource\/","name":"AccuWeb Cloud","description":"Cutting Edge Cloud Computing","publisher":{"@id":"https:\/\/accuweb.cloud\/resource\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/accuweb.cloud\/resource\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/accuweb.cloud\/resource\/#organization","name":"AccuWeb.Cloud","url":"https:\/\/accuweb.cloud\/resource\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/","url":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg","contentUrl":"https:\/\/accuweb.cloud\/resource\/wp-content\/uploads\/2024\/04\/accuwebcloud_logo_black_tagline.jpg","width":156,"height":87,"caption":"AccuWeb.Cloud"},"image":{"@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/a7a4cbe8405202b537509c757b588c58","name":"Jilesh Patadiya","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/accuweb.cloud\/resource\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2cea2bdb5bbabb771ee67e96acad7396f25cb1a0c360b9bc4a9ac40cea9cd8b2?s=96&d=mm&r=g","caption":"Jilesh Patadiya"},"description":"Jilesh Patadiya, the visionary Co-Founder and Chief Technology Officer (CTO) behind AccuWeb.Cloud. Founder &amp; CTO at AccuWebHosting.com. He shares his web hosting insights on the AccuWeb.Cloud blog. He mostly writes on the latest web hosting trends, WordPress, storage technologies, and Windows and Linux hosting platforms.","sameAs":["https:\/\/accuweb.cloud\/resource","https:\/\/www.facebook.com\/accuwebhosting","https:\/\/www.instagram.com\/accuwebhosting\/","https:\/\/www.linkedin.com\/company\/accuwebhosting\/","https:\/\/x.com\/accuwebhosting","https:\/\/www.youtube.com\/c\/Accuwebhosting"],"url":"https:\/\/accuweb.cloud\/resource\/author\/accuwebadmin"}]}},"_links":{"self":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq\/41705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/comments?post=41705"}],"version-history":[{"count":9,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq\/41705\/revisions"}],"predecessor-version":[{"id":53238,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/faq\/41705\/revisions\/53238"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/media\/52879"}],"wp:attachment":[{"href":"https:\/\/accuweb.cloud\/resource\/wp-json\/wp\/v2\/media?parent=41705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}