How to Upgrade WordPress via SSH - DailyBlogTips
|
Posted: 21 May 2012 05:40 AM PDT
For most WordPress users updating to a newer version is pretty straight forward: log into the WordPress dashboard, click on “Updates” and then select the option to update WordPress. Within 10 seconds or so you are set. Depending on the settings of your server, though, the automatic update option will not work. In this case you’ll need to perform the update manually, which means deleting and uploading the files via FTP, which takes a lot of time (around 15 minutes for all WordPress files with an average Internet connection). Is there a better way? Yep, and it’s called SSH. SSH stands for Secure Shell, and it’s a protocol for remote communications. Using this protocol you can basically connect to your server and perform commands as if you were using the computer personally. Warning: Make sure to backup all your data and databases before trying any type of update, as you could mess things up and lose everything. Try the stuff below at your own risk. First of all you need to contact your hosting provider to make sure you have SSH enabled on your account. After that you can login to your server by typing ssh user@mydomain.com on the command line, and after that you’ll be prompted to put your password. Usually the user and password are the same of your FTP account, but they might be different. Once you are logged in you need to browse to your public_html directory, which is usually where WordPress is installed. If you are using a sub-directory, navigate to it. Then type this to download the latest WordPress files: wget http://wordpress.org/latest.tar.gz After that type this to decompress the file: tar xfz latest.tar.gz Next we need to delete the wp-admin and wp-includes directories, which you can do with the following commands: rm -rf ./wp-includes Now you want to move the new wp-admin and wp-include directories to the root, so type the following commands: mv ./wordpress/wp-admin ./ Finally, go inside the WordPress directory with cd wordpress and copy its content to the parent directory (i.e., the root) overwriting the old ones: cp -rpf -f * ../ Finally, type “cd ..” to go back to the root directory and delete both the tar file you downloaded and the wordpress directory with this: rm -rf ./wordpress/ That’s it. All you have to do now is to run the upgrade script on your WordPress install (i.e., domain.com/wp-admin/upgraded.php). Original Post: How to Upgrade WordPress via SSH |
You are subscribed to email updates from Daily Blog Tips To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
0 Comments:
Posting Komentar