0

I had my wordpress files in /var/www/site1.com but i move them in /var/www/site2.com and now wordpress can't load. If i open the home page it just show something that look like basic html page with some titles and few links but the links are not working. If i click on the LogIn link it shows: /wp-login.php was not found on this server.

I guess this is a issue with broken paths but i am not sure how to fix it.

I also cleared the mysql cache with the commands: FLUSH TABLES; and RESET QUERY CACHE; but this didn't help.

How to resolve this issue?

EDIT: The problem was in wordpres database. I login in phpmyadmin and in the table wp_options i changed the path for siteurl and home to the new wordpress directory. But i don't know if this can be done without using phpmyadmin. It will be good if this can be done by modifing some of the wordpress configuration files.

0

Apache 2.2 will often use the sites-available directory with a configuration file that points to your root directory. Is this what you modified or did you add another file to the sites-available directory or did you just create rename the directory? If you renamed, you need to edit the appropriate file in the sites-available directory.

  • The new wordpress location is here: /var/www/site2.com. The virtual host file is here: /etc/apache2/sites-available/site2.com. The content of site2.com file is this: <VirtualHost *:80> ServerName site2.com DocumentRoot /var/www/site2.com </VirtualHost> – user1800997 Jul 18 '15 at 15:10
0

In addition to Apache configuration updates, you'll need to update wp internals also. Please refer to http://codex.wordpress.org/Changing_The_Site_URL for detailed steps. Basically you'll need to add a couple of defines to wp-config.php file with new url.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.