migration - migrated wordpress site not running properly, on Ubuntu localhost?

admin2025-01-08  4

Hellos friends,

I have migrated wordpress site, when i run this on my Ubuntu local host the Home page running but other pages like blog,contact-us,services these pages not running,when i click on it then it shows me the given error


Not Found

The requested URL /wordpress-4.7/wordpress/about-us/ was not found on this server. Apache/2.4.18 (Ubuntu) Server at localhost Port 80


this type of error message has been display i have using Ubuntu 16.04 Os In wordpress dashboard the pages are available but it is not running. Any solution please share. Thanks in advance..

Hellos friends,

I have migrated wordpress site, when i run this on my Ubuntu local host the Home page running but other pages like blog,contact-us,services these pages not running,when i click on it then it shows me the given error


Not Found

The requested URL /wordpress-4.7/wordpress/about-us/ was not found on this server. Apache/2.4.18 (Ubuntu) Server at localhost Port 80


this type of error message has been display i have using Ubuntu 16.04 Os In wordpress dashboard the pages are available but it is not running. Any solution please share. Thanks in advance..

Share Improve this question edited Mar 27, 2017 at 14:32 fuxia 107k38 gold badges255 silver badges459 bronze badges asked Mar 27, 2017 at 14:24 Santosh BhagwatSantosh Bhagwat 1738 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736267696a1215.html

最新回复(0)