Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Here are a bunch of useful Linux commands for transferring files:
- cd /var/www/stage/wp-content
- ## Zip up the plugins folder
- zip -r plugins-2018-07-03.zip plugins
- ## This will show you the zip file exists
- ls -l
- ## Transfer the zipped file
- scp plugins-2018-07-03.zip [[USERNAME]]@[[IP.ADDRESS]:/home/[[ USERNAME]]
- ## You can now open another terminal window and log into the dev server, and cd ~ (home directory)
- ## This will show you the newly transferred zip file when it is complete
- ls -l
- ## This will create a directory called "plugins" at /var/www/[[WORDPRESSPATH/wp-content/, so you will need to change the path to wherever the sites are all located/whichever Virtual host you are using
- sudo unzip plugins-2018-07-03.zip -d /var/www/[[WORDPRESSPATH]]/wp-content/
- ## Other Commands
- ## If you ever need to run a SQL file via terminal:
- mysql -u root -p[[PASSWORD]] < /var/www/scripts/[[SCRIPTNAME]].sql
- ## Change ownership to apache for uploads (fixes permsision errors)
- sudo chown -R apache:apache /var/www/stage/wp-content/uploads
- ## Set all folders & files permission for owner write only
- cd /var/www/stage
- find . -type d -exec chmod 755 {} \;
- find . -type f -exec chmod 644 {} \;
- ## More permissive/gives group write access (useful for allowing WP to install/update plugins & FTP access)
- cd /var/www/stage
- find . -type d -exec chmod 775 {} \;
- find . -type f -exec chmod 664 {} \;
- ## Restart Apache on CentOS 7
- sudo systemctl restart httpd
Advertisement
Add Comment
Please, Sign In to add comment