306: How to update Drupal 7 manually.
One of the greatest threats to any website is outdated software. You will want to stay up to date with your Drupal 7 site. Updates are released often to fix bugs or add small features. Just as often, however, updates are released with new security plugs. This helps keep hackers at bay and keep your website strong. While not a complicated procedure, Drupal 7 does not have an auto-update feature. Below are the instructions for updating your Drupal 7 site manually.
This article assumes you are using a cPanel host.
Manually updating your Drupal 7 site
- You will first need to download the newest version of Drupal 7 to your local computer. You can find that by visiting http://drupal.org/download.
- Log into your cPanel account.
- Once logged in, find the Files category and click on the File Manager icon. Be sure to select the web root location.
- Look through your folder structure and locate the folder your Drupal 7 installation is housed. Do Not go into the folder. If it is in the public_html folder itself, be sure to click on the Up One Level icon at the top of the right panel.
- Once you have located the folder, click on the name to highlight the folder, then click on the Copy icon found in the upper menu bar over to the left side. You will see a popup where you can name the folder the copy will be assigned to. As long as it is unique, you can name it anything you like. For example, in this case, we named it Drupal7-copy. Click on the Copy Files button to save a copy of the folder.
- One more thing we want to preserve is the Sites folder in the original Drupal 7 location, go ahead and enter that folder (by double clicking it). Find the Sites folder, click it to highlight it, and then select the Rename icon. Rename the file, for example, to Sites_copy.
- Now that is complete, we want to upload the compressed file that you downloaded onto your computer. Be sure you are back in the folder above the Drupal 7 installation as you were previously. Click on the Upload button and browse to the file. Once you have find it and click on Open, the download will begin automatically. After uploading, click on the link in the middle of the page to take you back to your previous folder.
- Find the compressed file, click on it to highlight it, and click on the Extract icon. You will see a popup where you will be able to assign the folder for the content to be extracted to. Be sure to make it the same folder your Drupal installation resides.
- Once extracted, double click on the folder to get to the Drupal install. The new files are not there yet. They are in a subfolder that is named after the current version, for example drupal-7.17. Double click on that folder as well to enter it. Select all files and folders that appear in this folder by holding the Ctrl key and pressing the A key simultaneously. Then click on the Move icon so we can move them up to the correct folder above. A popup will appear enabling you to give the destination folder, simply remove the last folder from the path and click Move Files.
- After the move, go back up one folder by clicking the Up One Folder icon. You are now in the folder with all the new version files. We now need to ensure the Sites-copy file is returned to use>. Find the Sites folder, click on it to highlight it, and click the Delete icon to remove it. After that, click on the Sites-copy to highlight the folder and click on the Rename icon. From here, rename it to Sites.
- It is now time to ensure your Drupal site uses all the new files. Visit your site and and go to the install.php page. For example, if your domain name is ThisIsMySite.com, you will go to ThisIsMySite.com/install.php
- An install screen will appear notifying you Drupal is installed. Click on the link at the end of the statement To upgrade an existing installation, proceed to the update script. and it will update the configuration.
- After completing the update, you can ensure you have the correct version of Drupal by logging into your admin dashboard and clicking on Administration. From that page, click on the Reports option and then Status Report. This screen will give you the version number on the first line.
Support Center LoginOur Login page has moved, Click the button below to be taken to the login page.
2014-09-17 5:41 pm
Further to my last email I seem to have fixed it.
The directory for my TMP folder was fine. What I needed to do was changed the temp directory from '/tmp' to '../tmp' at /admin/config/media/file-system (not sure if that was what you werre suggesting - I am still a novice). I found the hint here:https://www.ostraining.com/blog/drupal/drupal-724-tmp-directory/
Thanks for your help
2014-09-17 6:02 pm
Thanks for clarifying the issue. I'll speak to the author of the issue and see if we can't make sure that the instructions for the tmp directory are clearer.
2014-09-17 2:17 pm
Thank you for that - I had not realized I had to do anything manual other than update drupal.
but then I followed the instructions but am still getting the same error. Any thoughts? What I did is below:
1) For the tmp directory - I assume we are referring to tmp directory in above the public html level. There was .htaccess one so I created one and filled it with the text as per the instructions.
2) I also found a .htaccess in .../sites/default/files and I replaced it accordingly.
I cleared cache and ran cron....
2014-09-17 2:59 pm
I can only speculate at this point because I have not had this issue myself. What version were you upgrading from? What version are you upgrading to? Also, have you changed the temp directory from '/tmp' to 'tmp' at ' www.yoursite.com/admin/config/media/file-system' suggested in the link you provided?
2014-09-17 5:32 pm
I think if I understand you correctly, I might have messed up on the tmp directory. Do the instructions mean that I need to create a tmp directory on my computer and not use the one on my website? I added the .htaccess to the existing tmp folder that is at the same level (hierarchy) as the public_html folder.
Am I making any sense?
2014-09-17 12:32 pm
Thanks - it worked perfectly.
One question though - when I run cron I see the following message below. Clicking on the link, tells me that the solution is to upgrade to 7.24. But I bypassed that version to get to the current version on 7.31. Thoughts?
Temporary files directory Not fully protected See http://drupal.org/SA-CORE-2013-003 for information about the recommended .htaccess file which should be added to the /tmp directory to help protect against arbitrary code execution.
2014-09-17 12:53 pm
The security issues that are referenced were resolved in versions above 7.24, but it would be a good idea to place the recommended lines inside a .htaccess file in your /tmp directory for additional security.