Skip to content

Instantly share code, notes, and snippets.

@sandheepg
Last active March 8, 2017 07:04
Show Gist options
  • Select an option

  • Save sandheepg/a2a50e9bed7444bbfaa4d95e37028f0e to your computer and use it in GitHub Desktop.

Select an option

Save sandheepg/a2a50e9bed7444bbfaa4d95e37028f0e to your computer and use it in GitHub Desktop.
Deploying wordpress blog in Rails
  1. First of all make sure that your server can parse both php and rails application.

  2. Make a blog directory in side the public folder of rails application.

  3. Deploy all WordPress content inside blog directory.

  4. Configure your database connection at wp-config.php file .

  5. Then just paste the following code in the apache config file

<VirtualHost ...>
      ServerName ...
      DocumentRoot ...
      <Location /blog>
         PassengerEnabled off
         <IfModule mod_rewrite.c>
           RewriteEngine On
           RewriteBase /blog/
           RewriteCond %{REQUEST_FILENAME} !-f
           RewriteCond %{REQUEST_FILENAME} !-d
           RewriteRule . /blog/index.php [L]
         </IfModule>
      </Location>
  </VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment