特殊:Badtitle/NS100:WordPress
![]() |
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/WordPress }} |
![]() |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/af | • {{#if: UbuntuHelp:WordPress|Afrikaans| [[::WordPress/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/ar | • {{#if: UbuntuHelp:WordPress|العربية| [[::WordPress/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/az | • {{#if: UbuntuHelp:WordPress|azərbaycanca| [[::WordPress/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/bcc | • {{#if: UbuntuHelp:WordPress|جهلسری بلوچی| [[::WordPress/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/bg | • {{#if: UbuntuHelp:WordPress|български| [[::WordPress/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/br | • {{#if: UbuntuHelp:WordPress|brezhoneg| [[::WordPress/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/ca | • {{#if: UbuntuHelp:WordPress|català| [[::WordPress/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/cs | • {{#if: UbuntuHelp:WordPress|čeština| [[::WordPress/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/de | • {{#if: UbuntuHelp:WordPress|Deutsch| [[::WordPress/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/el | • {{#if: UbuntuHelp:WordPress|Ελληνικά| [[::WordPress/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/es | • {{#if: UbuntuHelp:WordPress|español| [[::WordPress/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/fa | • {{#if: UbuntuHelp:WordPress|فارسی| [[::WordPress/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/fi | • {{#if: UbuntuHelp:WordPress|suomi| [[::WordPress/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/fr | • {{#if: UbuntuHelp:WordPress|français| [[::WordPress/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/gu | • {{#if: UbuntuHelp:WordPress|ગુજરાતી| [[::WordPress/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/he | • {{#if: UbuntuHelp:WordPress|עברית| [[::WordPress/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/hu | • {{#if: UbuntuHelp:WordPress|magyar| [[::WordPress/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/id | • {{#if: UbuntuHelp:WordPress|Bahasa Indonesia| [[::WordPress/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/it | • {{#if: UbuntuHelp:WordPress|italiano| [[::WordPress/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/ja | • {{#if: UbuntuHelp:WordPress|日本語| [[::WordPress/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/ko | • {{#if: UbuntuHelp:WordPress|한국어| [[::WordPress/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/ksh | • {{#if: UbuntuHelp:WordPress|Ripoarisch| [[::WordPress/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/mr | • {{#if: UbuntuHelp:WordPress|मराठी| [[::WordPress/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/ms | • {{#if: UbuntuHelp:WordPress|Bahasa Melayu| [[::WordPress/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/nl | • {{#if: UbuntuHelp:WordPress|Nederlands| [[::WordPress/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/no | • {{#if: UbuntuHelp:WordPress|norsk| [[::WordPress/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/oc | • {{#if: UbuntuHelp:WordPress|occitan| [[::WordPress/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/pl | • {{#if: UbuntuHelp:WordPress|polski| [[::WordPress/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/pt | • {{#if: UbuntuHelp:WordPress|português| [[::WordPress/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/ro | • {{#if: UbuntuHelp:WordPress|română| [[::WordPress/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/ru | • {{#if: UbuntuHelp:WordPress|русский| [[::WordPress/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/si | • {{#if: UbuntuHelp:WordPress|සිංහල| [[::WordPress/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/sq | • {{#if: UbuntuHelp:WordPress|shqip| [[::WordPress/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/sr | • {{#if: UbuntuHelp:WordPress|српски / srpski| [[::WordPress/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/sv | • {{#if: UbuntuHelp:WordPress|svenska| [[::WordPress/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/th | • {{#if: UbuntuHelp:WordPress|ไทย| [[::WordPress/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/tr | • {{#if: UbuntuHelp:WordPress|Türkçe| [[::WordPress/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/vi | • {{#if: UbuntuHelp:WordPress|Tiếng Việt| [[::WordPress/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/yue | • {{#if: UbuntuHelp:WordPress|粵語| [[::WordPress/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/zh | • {{#if: UbuntuHelp:WordPress|中文| [[::WordPress/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/zh-hans | • {{#if: UbuntuHelp:WordPress|中文(简体)| [[::WordPress/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:WordPress | UbuntuHelp:WordPress | {{#if: | :}}WordPress}}/zh-hant | • {{#if: UbuntuHelp:WordPress|中文(繁體)| [[::WordPress/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:WordPress|:WordPress|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :WordPress/zh | | {{#ifexist: WordPress/zh | | {{#ifeq: {{#titleparts:WordPress|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:WordPress|1|-1|}} | zh | | }}
Wordpress is a popular web publishing software, most commonly used for weblogs (also known as "blogs"). Follow these instructions to install Wordpress on Ubuntu 6.06 (Dapper Drake).
Alternative to manual installation
Some users may prefer to skip manual installation by using the unofficial pre-integrated TurnKey WordPress Appliance based on Ubuntu LTS.
LAMP Installation
Wordpress runs on the LAMP (Linux, Apache, MySQL, PHP) stack of applications. First you need to install and configure LAMP. See the ApacheMySQLPHP page.
Enable the Universe repository
Install Wordpress
Use any method to install.
wordpress php5-gd
An example is using the command line terminal with apt-get install:
sudo apt-get install wordpress php5-gd
The installation places the files in the /usr/share/wordpress folder, generally. So that Apache2 knows where to find the installation folder, make a symbolic link to the Apache2 www folder:
sudo ln -s /usr/share/wordpress /var/www/wordpress
Then install WordPress using the supplied script
sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress localhost
Note: (Use sh instead of bash for Feisty or earlier.) This script creates the MySQL database user wordpress for the new MySQL database named localhost (that will be used for WordPress). If you will be hosting a virtual host and/or already know your URL, it is best to name your database the same as your URL. For example, if your URL is wordpress.mydomain.org, then the command would be
sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n wordpress wordpress.mydomain.org
If you will be using a virtual host, create your apache2 virtual host file in the /etc/apache2/sites-available folder. When you are finished, enable it by making a symbolic link from that virtual host file to the sites-enabled folder. However, this can be dangerous until you have secured your WordPress installation against malicious anonymous users on the Internet, so should only be done after the initial installation is complete and anonymous user creation is turned off. Whenever you change your virtual hosts, you must restart Apache2:
sudo /etc/init.d/apache2 restart
Now, browse to "http://localhost/wordpress" in your browser to install it (or http://wordpress.mydomain.org/wordpress if you are using a virtual host). You will be given an initial user named admin and a random password. Write it down. Then login as the admin user and change the password.
For automatic updates to occur, the folder and all its files and subfolders must be owned by www-data:
chown -R www-data /usr/share/wordpress
While logged in to WordPress, do an automatic upgrade from the Tools -> Upgrade option. Once installed, to change the url of your site, link the file /etc/wordpress/config-localhost.php to /etc/wordpress/config-my.url.com.php as well as changing the url in the wordpress configuration Options menu. For example, if my dns was hello.homelinux.net
sudo ln -s /etc/wordpress/config-localhost.php /etc/wordpress/config-hello.homelinux.net.php
Change the URLs to:
Troubleshooting
Error when running setup-mysql
While installing wordpress you may encounter the following error.
$ sudo sh /usr/share/doc/wordpress/examples/setup-mysql -n (your mysql user) localhost /usr/share/doc/wordpress/examples/setup-mysql: 38: Syntax error: Bad substitution
This issue seems to be Edgy related. I did not encounter the error using Dapper. Here is a link to the bug reported on the Debian mailing list. Note: the issue seems to appear on Gutsy as well, only that the error code is slightly different:
/usr/share/doc/wordpress/examples/setup-mysql: 37: Syntax error: Bad substitution
To correct this, you first need to remove any configuration that may have already been created:
rm /etc/wordpress/config-localhost.php
Then run the same command but using bash instead of sh:
sudo bash /usr/share/doc/wordpress/examples/setup-mysql -n (your mysql user) localhost
External Links
The following are unverified suggestions made by users.
Curly Braces
Curly Braces is an weekly blog on technology. This article : Installing WordPress in Ubuntu | target=_blank provides a step by step guide on how to install the latest version of WordPress ini Ubuntu Jaunty Jackalope