Check the following steps.
1) add WP_HOME or WP_SITEURL in wp-config.php example bellow.
// for who are using virtualhost
define('WP_HOME', 'http://example.fmt');
define('WP_SITEURL', 'http://example.fmt');
if use localhost
define('WP_HOME', 'http://localhost/yoursite');
2) check .htaccess file. If you have no .htaccess file in your directory add the following code in the .htaccess in root folder in your site.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
3) enable mod_rewrite for php in ubuntu
sudo a2enmod rewrite
sudo gedit /etc/apache2/apache2.conf
change near <Directory /var/www/>
AllowOverride none to AllowOverride All
sudo service apache2 restart
4) See debug log. If any permission related issue occur, this will let you know
tail -f /var/log/apache2/error.log
5) Keep folder permission
sudo chmod -R 777 /var/www/html/yourwebsiteroot
Note: always try to use virtualhost.