Vagrant not connecting to my existing WordPress install

70 views
Skip to first unread message

Carl Gross

unread,
Nov 28, 2016, 5:06:51 AM11/28/16
to Vagrant
Hi all.  I am experiencing an issue in which my Vagrant is not loading my usual version of WordPress--it is attempting to begin a new WordPress installation instead.  To be clear, several weeks ago I setup a Vagrant box on my computer, installed the latest version of WordPress, and began building a website.  But today, after my usual vagrant up, when I navigated my browser to the URL of my usual Vagrant box, instead of loading my local WordPress site as usual, it prompted me to begin the process of configuring a fresh installation of WordPress.  Any ideas on how to troubleshoot/resolve?

All my previous WordPress files (specifically, those files in the wp-content folder) for my site still exist on my local computer, in the same directory.  Maybe I should just follow the prompts to re-install WordPress, then restore my backed up wp-content directory, then restore my backed up WordPress databse?

How This Began
  • After a session using my Vagrant box to edit my WordPress site, I closed Git Bash, but forgot to run a vagrant suspend.  I then tried to shut down Windows, but it complained that Virtual Machine still had open connections.  I cancelled the shut down, opened Git Bash and ran a vagrant suspend. It seemed to execute without issue, and indeed the Oracle VM Virtual Box Windows application indicated that the virtual machine was saved.  But when I tried to shut down Windows again, it gave the same error.  So I took a chance and forced a shut down.
  • When I next booted Windows, I ran vagrant up as usual.  That command seemed to execute without issue.  But when I navigated to the URL of my usual Vagrant box, it tried to take me on a new setup of WordPress. 
Of Note
  • I use my Vagrant box only to locally develop a WordPress website.  Until now, I have used this Vagrant box every day for several weeks without issue.  
  • I mentioned that my WordPress files are still located on my local machine.  But I also have a full backup located in my online GitHub repository. And I have a backup of my WordPress database on my web server.
  • It also appears that I have lost my nginx.conf file, which is may more may not be important.
Thanks in advance.

Carl Gross

unread,
Nov 28, 2016, 5:28:09 AM11/28/16
to Vagrant
Also, this *may* be more of a WordPress issue rather than a Vagrant issue at this point.  I guess my question is asking whether I can salvage my configuration from within Vagrant, or if I have to just reinstall WordPress at this point.

Thanks.

Robert Lilly

unread,
Nov 30, 2016, 4:25:08 PM11/30/16
to Vagrant
I suspect it has to do with a corrupt database for WordPress inside the VM. If WordPress can't connect to the database listed in wp-config.php it will assume that it's not installed and start the process over. I don't know how to fix the database inside the VM but I imagine that it got corrupted during the incomplete shutdown and will have to be re-created.

Carl Gross

unread,
Nov 30, 2016, 10:19:37 PM11/30/16
to vagra...@googlegroups.com
Thanks for that.  I resolved my issue by completing the steps to setup a fresh WordPress installation.  After, I saw that my wp-content folder was still intact, so this new WordPress installation still had my theme and plugins.  But itindeed none of the information contained in my database was present in this WP installation.  So I then migrated the database from my working, online installation of WordPress to my local installation of WordPress (since they were copies of each other).  After, my local WordPress install was back to normal.

In the least, it was a good exercise I guess.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/Td__MOExml8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/763c1087-8cbb-4473-bd81-89ccabc60bd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages