Codex

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

da:Opdatering af WordPress

IGANGVÆRENDE ARBEJDE

Her oversættes codex vedr. opdatering af wordpress. Den tekst der skal oversættes findes i original på Upgrading_WordPress samt nedenfor.

Den nyeste version af WordPress (6.6.2), er nu frigivet. Hvis du står overfor at skulle opdatere fra 2.0.3 til 2.0.4, skal du følge vejledningen: Opdater fra 2.0.3 til 2.0.4. Hvis du skal opdatere fra en tidligere version, fx 1.5.2 til 2.0.4 eller 2.0 eller 2.0.1 til 2.0.4, kan du enten følge den detaljerede vejledning eller den vejledning vi har kaldet Opdater WordPress på fem trin.

Opdater WordPress på fem trin

"Læs den Detaljerede vejledning, hvis du har brug for en grundigere vejledning."

Det kan godt være lidt kryptisk at opdatere WordPress. Men denne vejledning viser, hvordan det hele blir' en leg. Vejledningen giver dig også nogle retningslinier til, hvordan du beskytter dig mod de værste uheld. Du skulle jo nødig miste dine data.

Kernen i WordPress er nem og hurtig at opdatere. Det som gør, at denne vejledning er på fem trin og ikke tre, er at vi skal bevare de ændringer og justeringer, som du har lavet. Vejledning hedder "Opdater WordPress på fem trin". Men det betyder desværre ikke, at opdateringen kan klares på fem minutter. Det kan nemlig tage mere end 5 minutter at lave en sikkerhedkopi af dine data.

Vi antager, at din blogs URI ligner denne http://eksempel.dk/wordpress/.

De fem trin til en sund opdatering er:

Trin 1: Sikkerhedskopier databasen plus alle arkiver (også .htaccess)

Her er målet at gemme dine data og indstillinger

Trin 1a: Gem data

Brug phpMyAdmin eller et andet værktøj til at lave en sikkerhedskopi af WordPress-databasen.

Trin 1b: Gem indstillinger

Her skal du lave en sikkerhedskopi af alle de arkiver, som du enten har ændret eller tilføjet, siden du foretog standard installeringen. Brug en FTP klient til at hente alle relevante arkiver fra serveren. Du skal hente alle de arkiver (også .htaccess hvis den er ændret), som ligger i den mappe, hvor du i sin tid installerede WordPress. Lav som minimum en sikkerhedskopi af:

  • .htaccess
  • de arkiver, som dit aktiverede tema benytter (findes i /wp-content/)
  • mappen med billeder og andet materiale, som indgår i dine blogindlæg (/wp-images/)
  • arkiver fra kernen, som er blevet ændret ("hacket")
  • wp-config.php, som bl.a. indeholder brugernavn og kodeord til databasen.

Trin 2: Deaktiver udvidelser

Deaktiver alle udvidelser på din weblog via Plugin Management Page ( http://eksempel.dk/wordpress/wp-admin/plugins.php ). Nogle udvidelser virker måske ikke med WordPress 6.6.2. Derfor er det nødvendigt, at du deaktiverer alle udvidelser, inden du opdaterer. På den måde sikres, at du ikke kommer til at stå med en helt frisk og nymalket version af WordPress, som ikke virker.

Trin 3: Overskriv arkiver

Hent den nyeste version af WordPress og placer den i WordPress-mappen ved at overskrive alle eksisterende arkiver. Der sker ikke noget med dine billeder og temaer. De bliver ikke rørt. Hvis noget går galt og det hele går i ged, så er det, at du skal have fat i den sikkerhedskopien fra trin 1. Den er din sidste redning.

Ved at slette alle gamle arkiver og herefter placere arkiverne fra den nyeste version af WordPress på serveren, er sikker på, at alt er opdateret.

Trin 4: Kør opdateringen

Besøg opdateringssiden på din weblog ( http://eksempel.dk/wordpress/wp-admin/upgrade.php ) og følg vejledningen.

Trin 5: Genaktiver dine udvidelser een efter een

Nu er det tid til at genaktivere udvidelserne een efter een via Plugin Management Page ( http://eksempel.dk/wordpress/wp-admin/plugins.php ). Kontroller at alt fungerer som forventet, hver gang du aktiverer en udvidelse. På denne adresse kan du finde en liste over udvidelser, som gerne skulle fungere med WordPress 2.0. Hvis nu det skulle ske, at nogle udvidelser ikke fungerer, skal de deaktiveres. Og er du en flink blogger, så kontakter du programmøren og viderebringer de dårlige nyheder. Hvem ved, måske bliver udvidelsen opdateret.

Det var det. Opdateringen er fuldført.

Hjælp, der gik et eller andet galt! Tag det roligt. Du har jo lavet en sikkerhedskopi af databasen og alle arkiver på serveren - ik' os' ? Selvfølgelig har du det. Og det er dem, du skal have fat i nu. Find dem frem og følg den Detaljerede vejledning.



Detaljeret vejledning

Inden du begynder

  1. Lav en sikkerhedskopi af din database.
  2. Lav en sikkerhedskopi af alle WordPress-arkiver, også .htaccess hvis du har sådan en.
  3. Kotroller at sikkerhedskopierne rent faktisk kan bruges.
  4. Deaktiver ALLE udvidelser.

Vigtigt: Opdater kun WordPress, hvis du har udført disse fire punkter.

Oversigt over opdateringsprocessen

  1. Sikkerhedskopier databasen. Læs Backing Up Your Database hvis du vil have en detaljeret vejledning.
  2. Lav en sikkerhedskopiering af din database. Læs artiklenBacking Up Your Database for en mere detaljeret gennemgang.
  3. Sikkerhedspokier alle dine WordPress-filer. Glem ikke din.htaccess fil.
  4. Tjek, at de sikkerhedskopier, du tog, er der og virker. Dette er vigtigt.
  5. Deaktiver alle dine plugins.
  6. Sikr dig, at alle de foregående trin er gennemførte. Forsøg IKKE på at opgradere, før du har gennemført de første 4 trin.
  7. Download og udpak WordPress-filen fra http://wordpress.org/download/.
  8. Slet de gamle WordPress-filer på din side, men SLET IKKE
    • wp-config.php filen;
    • wp-content folderen; særlig undtagelse: folderen wp-content/cache skal slettes.
    • wp-images folderen;
    • wp-includes/languages/ folderen - hvis du bruger en sprogpakke, så slet den ikke;
    • .htaccess filen - hvis du har tilføjet særlige regler til din .htaccess, så slet den ikke;
    • robots.txt filen - hvis din blog er placeret i sitets rod (dvs. din blog er sitet) og du har lavet en sådan fil, slet da ikke denne.
  9. Upload de nye filer fra din computers harddisk til den rette WordPress-folder på din side.
  10. Kør WordPress-opgraderingen og følg instruktionerne på skærmen.
  11. Opdater permalinks og .htaccess-filen. Opdater din permalinkstruktur og smelt de specielle regler ind i.htaccess filen, hvis dette er nødvendigt.
  12. Installer opdaterede plugins og themes. Tjek venligst listen over plugins, der virker i version 2.0 og undersøg, om dit temas koder har en kompatibel version.
  13. Genaktivér dine plugins.
  14. Se ændringerne i WordPress.

Det er en oversigt over opdateringsprocessen. Læs videre og læs de detajlerede opdateringsinstruktioner.

Husk, at hvis du støder på problemer, er det enn god idé at genlæse instruktionerne nedenfor og forsikre dig, at du har fulgt den rette procedure. Konsulter også oplysningerne om problemknusning i forbindelse med installationen.

Detaljerede opdateringsinstruktioner for 1.5.x til 2.0.4 og 2.0 til 2.0.4

Det følgende er instruktioner, der forklarer ovenstående oversigt mere detaljeret. Læs alle instruktionerne før du starter.

Trin 1: Lav en sikkerhedskopi af din database

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

It is extremely important to back up your database 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 your database from these backups.

Trin 2: Lav sikkerhedskopi af alle dine WordPress-filer

Back up ALL of your files in your WordPress directory and your .htaccess file. Typically, this process involves using an FTP program to download ALL your WordPress files from your host to your local computer. Please read Backing Up Your WordPress Site for further explanation.

If you have made changes to any core WordPress files, or if you've got customized Plugins or Themes, you will want to have a good backup of those files. It is extremely important to back up your files 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 files.

Trin 3: Tjek dine sikkerhedskopier

Verify that the backups you created are there and usable. This is the most important step in the upgrade process! The verification process involves making sure you can see the backup files on your local computer (or wherever you've stored them) and that you can navigate into any sub-folders. If the files are in a zip file, make sure you can open the zip file.

Trin 4: Deaktiver alle dine plugins

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

Trin 5: Sikr dig, at de første 4 trin er gennemførte

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 steps.

The best resource for problems with your 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 steps.

Trin 6: Download og udpak WordPress-softwaren

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 your computer with your favorite web browser and unzip the package.
  • If you have shell access to your web server, and are comfortable using console-based tools, you may wish to download WordPress directly to your 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 your 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.

Trin 7: Slet gamle WordPress-arkiver

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 files:

  • wp-config.php file;
  • wp-content folder;
  • wp-images folder;
  • wp-includes/languages/ folder--if you are using a language file, do not delete this folder;.
  • .htaccess file--if you have added custom rules to your .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; files; Typically files in your root or wordpress folder. Again, don't delete the wp-config.php file.
  • wp-admin folder;
  • wp-includes folder; If using a language file remember don't delete the wp-includes/languages/ folder
  • wp-content/cache folder; You only see this folder if you are upgrading FROM WordPress 2.0.

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

Using FTP to delete files and folders 
The same FTP client you use for uploading can be used to delete files and folders. If your FTP client does not appear to permit you to delete non-empty folders, check the available options for your 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 files you need to keep and to delete ONLY the wordpress files in your directory (plus .htaccess):
  • 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 your templates or plugins from your backup directory. For example, cp backup/index.php.
Alternatively, using SSH, you could copy wp-config.php, .htaccess, and any content files 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.

Trin 8: Upload de nye filer

With the new upgrade on your local computer, and using FTP, upload the new files to your 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 files during the upload.

The wp-content folder holds your WordPress Themes and Plugins. These should remain. Upload everything else first, then upload only those WordPress files that new or changed to your 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.

Trin 9: Kør WordPress' opgraderingsproces

Run the WordPress upgrade script by accessing wp-admin/upgrade.php in your favorite web browser and follow the instructions presented on your screen.

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

Trin 10: Opdater dine permalinks og .htaccess-filen

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

Trin 11: Installer opdaterede plugins og themes

Please review the list of Plugins that work in Version 2.0. You will want to upload and install any new versions of your Plugins and Themes. Check with the author of those Plugins and Themes for the updated versions.

Trin 12: Genaktiver plugins

Use your Administration Panel, Plugins, to activate your Plugins.

Please note that if you are using the new WordPress Database Backup Plugin you may need to change the permissions on your wp-content folder to make it writeable by your webserver (either mode 666 or even 777). See Changing File Permissions for more details.

Trin 13: Se ændringerne i WordPress

Pt. er der ikke nogen officiel liste i kodekset, der beskriver alle de nye funktioner, men se disse links:

Opdater fra 2.0.3 til 6.6.2

Dette er en sikkerhedsopdatering. Du kan finde mere information i tråden med den officielle annoncering på WordPress.orgs udviklingsblog.

Som med alle WordPress-opdateringer skal indholdet i din /wp-content/ folder forblive intakt og uændret.

  1. Slet din /wp-admin/ folder.
  2. Slet din /wp-includes/ folder. Note: Du skal tage en sikkerhedskopi af /wp-includes/languages/ folderen, hvis den eksisterer.
  3. WordPress 6.6.2 indeholder et opdateret standardtheme. Hvis du vil have dette, slet da koden i din /wp-content/themes/default folder. Husk at lave en sikkerhedskopi af dine eventuelle ændringer først!
  4. Delete all the wordpress files in the root directory where the root index.php file is found. DO NOT DELETE wp-config.php (nor any files you may have added yourself: robots.txt, .htaccess, favicon.ico).
  5. Download and extract the new version.
  6. Upload it to the appropriate folders such as /wp-admin/, /wp-includes/, and if you deleted your Default theme, /wp-content/themes/default/.
  7. Upload all the files in the root directory.
  8. If existed, restore /wp-includes/languages/ directory
  9. Login as admin into your site - you will not be prompted to click on the link to upgrade your database as there were no changes to the database scheme between 2.0.3 and 2.0.4.

That's it.

Volunteers are assisting with problems on the WordPress Support Forums and there is useful information in the 2.0.2 upgrade thread.

Opdateringsvejledninger på andre sprog

Problemknusning

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 :)

Gammel opdateringsinformation

Hvis du overvejer at opgradere til WordPress 2.0.1, men kører version 1.2, følg da opgraderingsinstruktionerne beskrevet i dokumentationen om at opgradere fra WordPress 1.2 til 1.5. Når du har opgraderet til version 1.5.x, følg da instruktionerne som listet ovenfor for at opgradere fra 1.5 til 2.0.1.