Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. install virtual box
  2. install vargenat
  3. clone vvv=apache(if using apache!)
  4. enter vvvapache folder
  5. command vagrant up
  6. goto vvv.dev - this shows what is currently available to use
  7.  
  8. now we want to make our own wordpress instance to wokr on
  9. coomand vagrant ssh
  10. we are now in our virtuak server
  11. sites are stored iin the srv dirsctory
  12. cd into srv>www
  13. create new folder for your site (mkdir yoursitename)
  14. enther foldaer
  15. Lets test - you can create a simple php(or html?) file here to test called index.php
  16. after this is created go to the top level and cd to etc/apache2/custom-sites
  17. duplicate the wordpress-default.conf with cp wordpress-default.conf yoursitename.conf
  18. edit yoursitename.conf and remove the <virtualhost>...</virtualhost> from all the configurations EXCEPT "Default apache catch-all server" [remove stable, trunk,,delvelopsrc, develope build]
  19.  
  20. 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)
  21.  
  22. Crete another terminal window, go to local root and open etc/hosts text file
  23. you will see and entry with all of the various wp dev sites - add your to the list eg - local.yoursitename
  24.  
  25. Go back to the local server terminal window and restart server with sudo service apache2 restart
  26. You should be able to navigate to the text page in the browser and see your test page
  27.  
  28. Now install wordpress on here
  29. on localserver goto nav/www/yoursitename
  30. remove the test file we made (index.php)
  31. 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)
  32. Download the current version of WP
  33. copy zip to local host location - vvv-apache>www>yoursitename and exract the files (this is the local directory fo your server)
  34. You may need to move files up a level out of wordpress folder
  35. Navigate to local.yoursitename to see your WP install
  36. We now need a DB to store all the WP files
  37.  
  38. Go back to server terminal and create a DB with: mysql -u root -p
  39. Inside the mysql terminal type: CREATE DATABASE yoursitename;
  40. create a user: CREATE USER yourname@localhost IDENTIFIED BY 'password';
  41. link the user to the database: GRANT ALL PRIVILEGES ON yousitename.* TO yourname@localhost;
  42. then flush privileges: FLUSH PRIVILEGES;
  43. type 'exit' to quit the mysql terminal
  44.  
  45. Back to the browser
  46. Now we have a DB to use fill in the details with what you just created
  47. Databasename: yoursitename
  48. User name: yourname (notice no @localhost)
  49. password: password (I'm not sure where this value comes from or is its default check IDENTIFIED BY 'XXXXX')
  50. database host: localhost
  51. table prefix: wp_
  52. Now you can just folloe the onscreen steps to setup the WP site
  53.  
  54. To shut down the Virtual machine - navigate to the vargrantfile eg vvv-apache>www>yoursitename
  55. and type : vagrant halt
  56. To restart the server go to this directory and type: vagrant up
  57.  
  58. DONE!!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement