Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

pt-br:Atualização Extendida


cb-help.png
Artigo parcialmente traduzido ou que precisa de tradução
Este documento está parcialmente traduzido ou precisa ser traduzido. Toda a tradução é feita por voluntários e você pode ser um deles.
ParticiparArtigos para traduzirFórum de SuporteTodos os Artigos
cb-warning.png
Artigo ou Seção com explicações avançadas
A seguir, estão explicações ou instruções para usuários avançados, o que pode exigir o conhecimento de termos e ferramentas não comuns a todas as pessoas.
Adicione {{Avançado}} para usar esta caixa.

Instruções Detalhadas

Processo de Atualização

  1. Faça backup de seu banco de dados. Leia Backing Up Your Database for a detailed explanation.
  2. Faça backup de todos os arquivos WordPress in seu WordPress directory. Não esqueça seu arquivo .htaccess.
  3. Verifique seus backups you created are there and usable. This is essential.
  4. Desative todos os Plugins.
  5. Certifique-se de ter feito os 4 passos anteriores. Do not attempt the upgrade unless you have completed the first four Passos.
  6. Faça download e extraia o pacote WordPress do http://wordpress.org/download/.
  7. Exclua os arquivos WordPress no seu servidor on seu site, but NÃO EXCLUA OS SEGUINTES ARQUIVOS
    • wp-config.php file;
    • wp-content folder; Special Exception: the wp-content/cache and the wp-content/plugins/widgets folders should be deleted.
    • wp-images folder;
    • wp-includes/languages/ folder--if you are using a language file do not delete that folder;
    • .htaccess file--if you have added custom rules to seu .htaccess, do not delete it;
    • robots.txt file--if seu blog lives in the root of seu site (ie. the blog is the site) and you have created such a file, do not delete it.
  8. Envie seus novos arquivos from seu computer's hard drive to the appropriate WordPress folder on seu site.
  9. Execute o script de atualização do WordPress and follow the instructions on the screen.
  10. Atualize a estrutura de Links Permanentes e .htaccess. Update seu Permalink Structure and merge the custom rules, if necessary, into seu .htaccess file.
  11. Instale plugins e temas atualizados. Please review the list of Plugins that work in Version 6.6.2. Check for Theme Compatibility with 6.6.2 and ask seu Theme author for any new version.
  12. Re-ative seus Plugins
  13. Add security key definitions to the wp-config.php file
  14. Review what has changed in WordPress.

Essa é a visão geral do processo de atualização. Por favor, continue lendo as instruções de atualização detalhadas.

Remember, if you do encounter problems, re-read the Instructions below to insure you've followed the proper procedures and consult Troubleshooting: Common Installation Problems.

Detailed Upgrade Instructions for 1.5.x, and versions 2.0 - 2.6.5, to 6.6.2

The following are the instructions that explain the above Passos in more detail. Please read all of the instructions before starting.

If plan on upgrading across more than two major releases, please consider upgrading incrementally to avoid potential conflicts. For example, if you plan on upgrading from 2.5 to 6.6.2, upgrade to 2.7 first, followed by 2.9, and finally 6.6.2. Older versions of WordPress can be downloaded from the release archive.

Passo 1: Faça backup de seu banco de dados

Perform a backup of seu banco de dados. All of seu WordPress data, such as Users, Posts, Pages, Links, and Categories, are stored in seu MySQL banco de dados. Please read Backing Up Your Database for a detailed explanation of this process.

It is extremely important to back up seu banco de dados before beginning the upgrade. If, for some reason, you find it necessary to revert back to the 'old' version of WordPress, you may have to restore seu banco de dados from these backups.

Passo 2: Faça backup de todos os arquivos WordPress

Faça backup ALL of seu arquivos in seu WordPress directory and seu .htaccess file. Typically, this process involves using an FTP program to download ALL seu WordPress arquivos from seu host to seu local computer. Please read Backing Up Your WordPress Site for further explanation.

If you have made changes to any core WordPress arquivos, or if you've got customized Plugins or Themes, you will want to have a good backup of those arquivos. It is extremely important to back up seu arquivos before beginning the upgrade. If for some reason you find it necessary to revert back to the 'old' version of WordPress you will need to upload these arquivos.

Passo 3: Verifique seus backups

Verify that the backups you created are there and usable. This is the most important Passo in the upgrade process! The verification process involves making sure you can see the backup arquivos on seu local computer (or wherever you've stored them) and that you can navigate into any sub-folders. If the arquivos are in a zip file, make sure you can open the zip file. Also consider opening a .sql file in an editor to see if the tables and data are represented.

Passo 4: Desative todos os Plugins

In seu Administration panel, under the Plugins choice, deactivate any Plugins. Because of the changes to WordPress, some Plugins may conflict with the upgrade process.

Passo 5: Certifique-se de ter feito os 4 passos anteriores

If you have not completed the first four procedures, STOP, and do them! Do not attempt the upgrade unless you have completed the first four Passos.

The best resource for problems with seu upgrade is the WordPress Support Forums, and if you have problems, the volunteers at the WordPress Support Forums will likely ask if you have completed the first four Passos.

Passo 6: Faça download e extraia o pacote WordPress

Download and unzip the WordPress package from http://wordpress.org/download/.

  • If you will be uploading WordPress to a remote web server, download the WordPress package to seu computer with seu favorite web browser and unzip the package.
  • If you have shell access to seu web server, and are comfortable using console-based tools, you may wish to download WordPress directly to seu web server. You can do so using wget , lynx or another console-based web browser, which are valuable if you want to avoid FTPing. Place the package in a directory parallel to seu current wordpress directory (like "uploads," for example). Then, unzip it using: gunzip -c wordpress-6.6.2.tar.gz | tar -xf - or by using: tar -xzvf latest.tar.gz

The WordPress package will be extracted into a folder called wordpress.

Passo 7: Exclua os arquivos WordPress no seu servidor

Why Delete? Generally, it is a good idea to delete whatever is possible because the uploading (or upgrading through cPanel) process may not correctly overwrite an existing file and that may cause problems later.

DO NOT DELETE these folders and arquivos:

  • wp-config.php file;
  • wp-content folder;
  • wp-images folder--only older installations from 1.5.x days will have this folder;
  • wp-includes/languages/ folder--if you are using a language file, and it is here rather than in wp-content/languages/, do not delete this folder (you might want to move seu language arquivos to wp-content/languages/ for easier upgrading in the future);.
  • .htaccess file--if you have added custom rules to seu .htaccess, do not delete it;
  • Custom Content and/or Plugins--if you have any images or other custom content or Plugins inside the wp-content folder, do NOT delete them.

Delete these Files and Folders:

  • wp-* (except for those above), readme.html, wp.php, xmlrpc.php, and license.txt; arquivos; Typically arquivos in seu root or wordpress folder. Again, don't delete the wp-config.php file. Note: some arquivos such as wp.php may not exist in later versions such as 2.7.
  • wp-admin folder;
  • wp-includes folder; If you have a language file here, remember not to delete the wp-includes/languages/ folder
  • wp-content/cache folder; You only see this folder if you are upgrading FROM WordPress 2.0.
  • wp-content/plugins/widgets folder; You only see this folder if you previously installed the Sidebar Widgets plugin. The Sidebar Widgets code conflicts with the built-in widget ability.

How to Delete? There are several ways to delete the arquivos from seu WordPress site. You can use seu FTP Client, or if you have access to Telenet or SSH you can use that. Some host providers also provide the ability to delete arquivos and folders.

Using FTP to delete arquivos and folders 
The same FTP client you use for uploading can be used to delete arquivos and folders. If seu FTP client does not appear to permit you to delete non-empty folders, check the available options for seu FTP client. You'll usually find an option that permits deleting non-empty folders. Deleting non-empty folders is a quick and thorough method cleaning out an old installation of WordPress. It is recommended that once the deleting is done, you switch back to the original setting for safety reasons.
Using Telnet or SSH to delete file 
If you have a command-line login (telnet or ssh), you can enter the following commands to make backup copies of the arquivos you need to keep and to delete ONLY the wordpress arquivos in seu directory (plus .htaccess). If you've customized other arquivos (like index.php) not included by the cp commands below, copy them as well:
  • mkdir backup
  • cp wp-config.php .htaccess backup
  • cp -R wp-content backup
  • rm wp*.php .htaccess license.txt readme.html xmlrpc.php
  • rm -rf wp-admin wp-includes
  • cp backup/wp-config.php .
  • After you have finished with the upgrade, you can restore any customizations to seu templates or plugins from seu backup directory. For example, use cp backup/index.php . to restore index.php.
Alternatively, using SSH, you could copy wp-config.php, .htaccess, and any content arquivos you've added or altered into the new wordpress directory. Then, rename the old one (to archive it), and move the new one into its place.

Passo 8: Envie seus novos arquivos

With the new upgrade on seu local computer, and using FTP, upload the new arquivos to seu site server just as you did when you first installed WordPress. See Using FileZilla and Uploading WordPress to a remote host for detailed guidelines in using an FTP Client to upload.

NOTE: If you did not delete the wp-content folder, you will need to overwrite some arquivos during the upload.

The wp-content folder holds seu WordPress Themes and Plugins. These should remain. Upload everything else first, then upload only those WordPress arquivos that are new or changed to seu new wp-content folder. Overwrite any old versions of default plugins with the new ones.

The WordPress default theme has changed so you will want to upload the wp-content/themes/default folder. If you have custom changes to the default theme, those changes will need to be reviewed and installed after the upgrade.

Passo 9: Execute o script de atualização do WordPress

Using a web browser, go to the WordPress admin pages at the normal /wp-admin location. WordPress will check to see if a banco de dados upgrade is necessary, and if it is, it will give you a new link to follow.

This link will lead you to run the WordPress upgrade script by accessing wp-admin/upgrade.php. Follow the instructions presented on seu screen.

Note: Make sure the banco de dados user name registered to WordPress has permission to create, modify, and delete banco de dados tables before you do this Passo. If you installed WordPress in the standard way, and nothing has changed since then, you are fine.

If you want to run the upgrade script manually:

  • If WordPress is installed in the root directory, point seu browser to: http://example.com/wp-admin/upgrade.php
  • If WordPress is installed in its own subdirectory called blog, for example, point seu browser to: http://example.com/blog/wp-admin/upgrade.php

If you experience difficulties with login after seu upgrade, it is worth clearing seu browser's cookies.

Passo 10: Atualize a estrutura de Links Permanentes e .htaccess

In seu Administration > Settings > Permalinks panel update seu Permalink Structure and, if necessary, place the rules in seu .htaccess file. Also see Using Permalinks for details regarding Permalinks and the .htaccess file.

Passo 11: Instale plugins e temas atualizados

Please review the Plugin Compatibility List and Theme Compatibility List, or plugin/theme authors, to find plugins and themes compatible with seu new WordPress version. Upload and install new versions of seu Plugins and Themes, if necessary.

Passo 12: Re-ative seus Plugins

Use seu Administration Panel, Plugins, to activate seu Plugins. If seu plugins do not appear on the Plugin Compatibility List and you are not sure if they will work correctly with the new version, activate each plugin, one at a time, and test that there are no problems before continuing.

Passo 13: Add security key definitions to the wp-config.php file

Beginning with WordPress Version 2.6, three (3) security keys, AUTH_KEY, SECURE_AUTH_KEY, and LOGGED_IN_KEY, are used to insure better encryption of information stored in the user's cookies. Beginning with Version 2.7 a fourth key, NONCE_KEY, was added to this group.

If you don't find the keys in seu wp-config.php file, add the keys definitions with reference to Editing wp-config.php - Security Keys, and upload to seu server.

Passo 14: Review what has changed in WordPress

Please review these resources to see what's new in WordPress:

Special note for Fantastico Upgrades

When using the Fantastico upgrade process to upgrade from a pre-Version 2.2, Fantastico will use the wp-config-sample.php file to regenerate a new wp-config.php file. By doing this, two new values, DB_CHARSET and DB_COLLATE, are placed into the wp-config.php file. Those lines should be deleted from seu wp-config.php if you are upgrading from a pre-Version 2.2 (like 2.0.10 or 2.1.3) to Version 6.6.2. A detailed explanation about DB_CHARSET and DB_COLLATE can be found in Editing wp-config.php.


Troubleshooting

Scrambled Layout or Errors 
If your blog looks scrambled now or features line errors, an old plugin that doesn't work with the new code may be the culprit. In your WordPress Administration Panel, deactivate all plugins that do not come with WordPress by default. Re-activate them one by one.
Made Custom Changes/Hacks? 
If you have made changes to other WordPress files ("hacked" WordPress), you are supposed to keep track of your changes. You will have to transfer your edits into the new code. WordPress Versions lists the files that have changed in each release.
Resist Using Old Code 
Upgrading gives you the newest and best code. Using your old code, no matter how much you have customised it, almost certainly will cause problems. The temptation just to use your old modified code will be great, but the chances of errors are much greater.
Can I Go Back to Old Versions 
You can, but it is usually not recommended to rollback (revert) your current version to an older version. That is because newer versions often include security updates and a rollback may put your site at risk. Second, the change between the database structure between versions may cause complications in maintaining your site content, posts, comments, and plugins that are dependent upon the information stored in the database. If you are still intent on this, proceed at your own risk. Please note, that without a backup of your entire site and your database, made prior to your upgrade attempt, a successful rollback is near impossible. Delete all WordPress files except for wp-config. Upload the files from your backup to your server and restore your database backup. Remember, you must have good backups for the rollback to work. For older WordPress versions, a rollback might not work.
Get More Help 
If you get any errors following an upgrade, check Troubleshooting: Common Installation Problems, Troubleshooting, and the Codex Installation Category of Articles. If you can't find an answer, post a clear question on the WordPress Suppport Forums. You will be asked if you have used any old code. You'll be told to change it then, so you may as well change it now :)

Old Upgrade Information

If you are considering upgrading to WordPress Version 6.6.2, but you are at Version 1.2, then follow the 1.2 to 1.5 upgrade as describe in Upgrading From WordPress Version 1.2 to 1.5. Once you are upgraded to Version 1.5.x, then follow the instructions as listed above to upgrade from 1.5 to 6.6.2.