Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- install virtual box
- install vargenat
- clone vvv=apache(if using apache!)
- enter vvvapache folder
- command vagrant up
- goto vvv.dev - this shows what is currently available to use
- now we want to make our own wordpress instance to wokr on
- coomand vagrant ssh
- we are now in our virtuak server
- sites are stored iin the srv dirsctory
- cd into srv>www
- create new folder for your site (mkdir yoursitename)
- enther foldaer
- Lets test - you can create a simple php(or html?) file here to test called index.php
- after this is created go to the top level and cd to etc/apache2/custom-sites
- duplicate the wordpress-default.conf with cp wordpress-default.conf yoursitename.conf
- edit yoursitename.conf and remove the <virtualhost>...</virtualhost> from all the configurations EXCEPT "Default apache catch-all server" [remove stable, trunk,,delvelopsrc, develope build]
- change the properties in the Default to DocumentRoot /srv/www/yoursitemane and Servername local.yoursitename (this can be whatever you want to navigate to get to your site)
- Crete another terminal window, go to local root and open etc/hosts text file
- you will see and entry with all of the various wp dev sites - add your to the list eg - local.yoursitename
- Go back to the local server terminal window and restart server with sudo service apache2 restart
- You should be able to navigate to the text page in the browser and see your test page
- Now install wordpress on here
- on localserver goto nav/www/yoursitename
- remove the test file we made (index.php)
- Aside - If you want to use the Duplicator plugin exported files - copy installer.php and acrchive.zip to this folder and go to installer.php and follow instructions (not sure of DB credentials tbh)
- Download the current version of WP
- copy zip to local host location - vvv-apache>www>yoursitename and exract the files (this is the local directory fo your server)
- You may need to move files up a level out of wordpress folder
- Navigate to local.yoursitename to see your WP install
- We now need a DB to store all the WP files
- Go back to server terminal and create a DB with: mysql -u root -p
- Inside the mysql terminal type: CREATE DATABASE yoursitename;
- create a user: CREATE USER yourname@localhost IDENTIFIED BY 'password';
- link the user to the database: GRANT ALL PRIVILEGES ON yousitename.* TO yourname@localhost;
- then flush privileges: FLUSH PRIVILEGES;
- type 'exit' to quit the mysql terminal
- Back to the browser
- Now we have a DB to use fill in the details with what you just created
- Databasename: yoursitename
- User name: yourname (notice no @localhost)
- password: password (I'm not sure where this value comes from or is its default check IDENTIFIED BY 'XXXXX')
- database host: localhost
- table prefix: wp_
- Now you can just folloe the onscreen steps to setup the WP site
- To shut down the Virtual machine - navigate to the vargrantfile eg vvv-apache>www>yoursitename
- and type : vagrant halt
- To restart the server go to this directory and type: vagrant up
- DONE!!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement