Wordpress Only homepage works

Posted May 14, 2014 10.6k views
I recently configured LAMP on Ubuntu 14.04 x32 but only the homepage works: I enabled mod_rewrite in apache and created .htaccess file but it doesn't seem to be working. Any help would be appreciated.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers
Forget the ip. When you access the site using the domain it works. Access your wordpress control panel and go to Settings and click on permalinks. There you will see some options, probably Default is selected. Choose the one that fits you and Save Changes.
Looks like a php error. Try adding the following lines to wp-config.php (after the first line, <?php) and then reloading the page -- do you see any errors?
@ini_set( 'log_errors', 'Off' );

ini_set( 'display_errors', 'On' );
ini_set( 'error_reporting', E_ALL );
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', false );
define( 'WP_DEBUG_DISPLAY', true );
Make sure to delete them once you're done as it's considered a security risk.
Thanks Kamal, after adding the lines above this is the error I am getting:

Notice: Constant WP_DEBUG already defined in /var/www/html/wp-config.php on line 93

Parse error: syntax error, unexpected end of file in /var/www/html/wp-content/themes/caminadog/index.php on line 1179

What could be causing the unexpected end of file?


@Marinos Sianios: Thanks, but I had the same issue with the domain name, that's why I had to use only IP.
Kamal, thanks for your your help!

I finally fixed the issue following this answers: