2

I'm trying to install wordpress 3.9.1 in a subdomain, I know it works because I have the same version in localhost using XAMPP. The subdomain is working (I tested it with html and php files), but no wordpress file is running, I only get blank pages (not errors, just blank pages). The databases are created, the wp-config.php is edited and the privileges are granted, but still I cannot get the wordpress files to run. This is my configuration:

OS: CentOS 6.5 Provider: Digital Ocean PHP: 5.3.3 Apache: 2.2.15

my VirtualHost looks like this:

<VirtualHost *:80>
  ServerName blog.domain.com
  DocumentRoot /var/www/blog/
  <Directory "/var/www/blog/">
    Options Indexes FollowSymlinks
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>
nigonzalezm
  • 190
  • 2
  • 10
  • You need a more specific title, it should be a question. Tell us what the result is when going to the site. – stephen Aug 07 '14 at 22:30
  • I edited question and results: I only get blank pages. Thanks. – nigonzalezm Aug 07 '14 at 22:35
  • Go to `site/index.php`, otherwise create a file phpinfo.php and place in that blog folder and go there in URL. Phpinfo.php should contain `echo phpinfo();` – stephen Aug 07 '14 at 22:45
  • I already did it, it is working, it prints the php info. – nigonzalezm Aug 07 '14 at 22:47
  • 1
    Make sure there is an `index.php` and turn error reporting on, it would be best to use `.htaccess` in this case.http://stackoverflow.com/questions/6127980/enabling-error-display-in-php-via-htaccess-only – stephen Aug 07 '14 at 22:51
  • Do you have access to the error log to see where it's breaking? – kaleazy Aug 07 '14 at 22:57
  • You sir @StevieG are a genius! I had a bad character in my salt keys in the wp-config.php, enabling the error reporting lead me to the bad line. Thanks! – nigonzalezm Aug 07 '14 at 23:02

1 Answers1

0

To configure wordpress subdomain as you need:

1) configure the virtualhost, example

<VirtualHost *:80>
ServerAdmin you@domain.com
DocumentRoot "/var/www/blog/"
ServerName blog.domain.com
ErrorLog "/var/log/blog.domain.com-error_log"
CustomLog "/var/log/blog.domain.com-access_log" common
<Directory "/var/www/blog/">
    Options +Includes
    AllowOverride all
</Directory>

2) Configure wordpress to use the subdomain:

Place the following line of code to the end of the file wp-config.php

define('WP_HOME', 'http://blog.domain.com');
define('WP_SITEURL', 'http://blog.domain.com');
Queli Coto
  • 586
  • 4
  • 9