Languages: English • Español • Deutsch • বাংলা • Français • Italiano • Nederlands • のインストール 日本語 한국어 • Português • Português do Brasil • Русский • Slovenčina • Српски • ไทย • 中文(简体) • 中文(繁體) • (Add your language)
WordPress is well-known for its ease of installation. Under most circumstances, installing WordPress is a very simple process and takes less than five minutes to complete. Many web hosts now offer tools (e.g. Fantastico) to automatically install WordPress for you. However, if you wish to install WordPress yourself, the following guide will help. Now with Automatic Upgrade, upgrading is even easier.
The following installation guide will help you, whether you go for the Famous 5 Minute Installation, or require the more detailed installation guide.
Before you begin the install, there are a few things you need to have and do.
These are:
Begin your installation by:
Here's the quick version of the instructions for those who are already comfortable with performing such installations. More detailed instructions follow.
If you are not comfortable with renaming files, step 3 is optional and you can skip it as the install program will create the wp-config.php file for you.
That's it! WordPress should now be installed.
Download and unzip the WordPress package from https://wordpress.org/download/.
If you are using a hosting provider, you may already have a WordPress database set up for you, or there may be an automated setup solution to do so. Check your hosting provider's support pages or your control panel for clues about whether or not you'll need to create one manually.
If you determine that you'll need to create one manually, follow the instructions for accessing phpMyAdmin on various servers, or follow the instructions for Using Plesk, Using cPanel or Using phpMyAdmin below.
If you are installing WordPress on your own web server, follow the Using phpMyAdmin or Using the MySQL Client instructions below to create your WordPress username and database.
If you have only one database and it is already in use, you can install WordPress in it - just make sure to have a distinctive prefix for your tables to avoid over-writing any existing database tables.
Note: Plesk recommends all users to install and manage WordPress using the WordPress Toolkit. However, if you wish to install WordPress manually, follow these steps to create a database:
Once the database has been created, click Connection info to see the information you will need to connect to the database (database server hostname and port, database name, and the database user name).
If your hosting provider supplies the cPanel hosting control panel, you may follow these simple instructions to create your WordPress username and database. A more complete set of instructions for using cPanel to create the database and user can be found in Using cPanel.
Lunarpages has developed their own version of cPanel.
If your web server has phpMyAdmin installed, you may follow these instructions to create your WordPress username and database. If you work on your own computer, on most Linux distributions you can install PhpMyAdmin automatically.
Note: These instructions are written for phpMyAdmin 4.4; the phpMyAdmin user interface can vary slightly between versions.
You can create MySQL/MariaDB users and databases quickly and easily by running mysql from the shell. The syntax is shown below and the dollar sign is the command prompt:
$ mysql -u adminusername -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5340 to server version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE databasename; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" -> IDENTIFIED BY "password"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) mysql> EXIT Bye $
The example shows:
If you need to write these values somewhere, avoid writing them in the system that contains the things protected by them. You need to remember the value used for databasename, wordpressusername, hostname, and password. Of course, since they are already in (or will be shortly) your wp-config.php file, there is no need to put them somewhere else, too.
a. If you're a regular User of a single-site webhosting account, you can log in normally. Then click MySQL Management. (If this is not readily visible, perhaps your host needs to modify your "package" to activate MySQL.) Then follow part "c" below.
b. Reseller accounts Admin accounts may need to click User Level. They must first log in as Reseller if the relevant domain is a Reseller's primary domain... or log in as a User if the domain is not a Reseller's primary domain. If it's the Reseller's primary domain, then when logged in as Reseller, simply click User Level. However if the relevant domain is not the Reseller's primary domain, then you must log in as a User. Then click MySQL Management. (If not readily visible, perhaps you need to return to the Reseller or Admin level, and modify the "Manage user package" or "Manage Reseller package" to enable MySQL.)
c. In MySQL Management, click on the small words: Create new database. Here you are asked to submit two suffixes for the database and its username. For maximum security, use two different sets of 4-6 random characters. Then the password field has a Random button that generates an 8-character password. You may also add more characters to the password for maximum security. Click Create. The next screen will summarize the database, username, password and hostname. Be sure to copy and paste these into a text file for future reference.
You can either create and edit the wp-config.php file yourself, or you can skip this step and let WordPress try to do this itself when you run the installation script (step 5) (you’ll still need to tell WordPress your database information).
(For more extensive details, and step by step instructions for creating the configuration file and your secret key for password security, please see Editing wp-config.php.)
Return to where you extracted the WordPress package in Step 1, rename the file wp-config-sample.php to wp-config.php, and open it in a text editor.
Enter your database information under the section labeled
// ** MySQL settings - You can get this info from your web host ** //
Enter your secret key values under the section labeled
* Authentication Unique Keys.
Save the wp-config.php file.
Now you will need to decide where on your domain you'd like your WordPress-powered site to appear:
Note: The location of your root web directory in the filesystem on your web server will vary across hosting providers and operating systems. Check with your hosting provider or system administrator if you do not know where this is.
Note: If your FTP client has an option to convert file names to lower case, make sure it's disabled.
Point a web browser to start the installation script.
If WordPress can't find the wp-config.php file, it will tell you and offer to try to create and edit the file itself. (You can also do this directly by loading wp-admin/setup-config.php in your web browser.) WordPress will ask you the database details and write them to a new wp-config.php file. If this works, you can go ahead with the installation; otherwise, go back and create, edit, and upload the wp-config.php file yourself (step 3).
The following screenshots show how the installation progresses. Notice that in entering the details screen, you enter your site title, your desired user name, your choice of a password (twice), and your e-mail address. Also displayed is a check-box asking if you would like your blog to appear in search engines like Google and Technorati. Leave the box unchecked if you would like your blog to be visible to everyone, including search engines, and check the box if you want to block search engines, but allow normal visitors. Note all this information can be changed later in your Administration Screens.
Note: You should not use "admin" as a user id as shown above!
If you successfully install the WordPress, login prompt will be displayed.
The following are some of the most common installation problems. For more information and troubleshooting for problems with your WordPress installation, check out FAQ Installation and FAQ Troubleshooting.
I see a directory listing rather than a web page.
The web server needs to be told to view index.php by default. In Apache, use the DirectoryIndex index.php directive. The simplest option is to create a file named .htaccess in the installed directory and place the directive there. Another option is to add the directive to the web server's configuration files.
I see lots of Headers already sent errors. How do I fix this?
You probably introduced a syntax error in editing wp-config.php.
My page comes out gibberish. When I look at the source I see a lot of "<?php ?>" tags.
If the <?php ?> tags are being sent to the browser, it means your PHP is not working properly. All PHP code is supposed to be executed before the server sends the resulting HTML to your web browser. (That's why it's called a preprocessor.) Make sure your web server meets the requirements to run WordPress, that PHP is installed and configured properly, or contact your hosting provider or system administrator for assistance.
I keep getting an Error connecting to database message but I'm sure my configuration is correct.
Try resetting your MySQL/MariaDB password manually. If you have access to MySQL/MariaDB via shell, try issuing:
SET PASSWORD FOR 'wordpressusername'@'hostname' = OLD_PASSWORD('password');
If you are using a version of MySQL prior to 4.1, use PASSWORD instead of OLD_PASSWORD. If you do not have shell access, you should be able to simply enter the above into an SQL query in phpMyAdmin. Failing that, you may need to use your host's control panel to reset the password for your database user.
I keep getting an Your PHP installation appears to be missing the MySQL extension which is required by WordPress message but I'm sure my configuration is correct.
Check to make sure that your configuration of your web-server is correct and that the MySQL plugin is getting loaded correctly by your web-server program. Sometimes this issue requires everything in the path all the way from the web-server down to the MySQL/MariaDB installation to be checked and verified to be fully operational. Incorrect configuration files or settings are often the cause of this issue.
My image/MP3 uploads aren't working.
If you use the Rich Text Editor on a blog that's installed in a subdirectory, and drag a newly uploaded image into the editor field, the image may vanish a couple seconds later. This is due to a problem with TinyMCE (the rich text editor) not getting enough information during the drag operation to construct the path to the image or other file correctly. The solution is to NOT drag uploaded images into the editor. Instead, click and hold on the image and select Send to Editor.
Although WordPress is very easy to install, you can use one of the one-click autoinstallers typically available from hosting companies. The most popular autoinstallers, WordPress Toolkit, Cloudron, Fantastico, Installatron, and Softaculous are described here.
The WordPress Toolkit helps Plesk users install and manage WordPress. It gives you two installation options:
Note that you are still responsible for making sure that your domain meets the requirements for WordPress installation (for example, that a supported PHP version is configured).
To perform a quick install, follow these steps:
To perform a custom install, follow these steps:
Regardless of the installation type you chose, the WordPress Toolkit can make managing your WordPress installation easier. Read the documentation for more information.
Cloudron is a complete solution for running apps on your server and keeping them up-to-date and secure. You can install one or more instances of WordPress and each installation gets a free SSL cert, is backed up and kept up-to-date automatically. You can try it out at the demo instance (username: cloudron password: cloudron).
Installatron is a one-click web application installer that enables WordPress and other top web applications to be instantly installed and effortlessly managed. WordPress installations managed by Installatron can be updated (manually or automated), cloned, backed up and restored, edited to change installation parameters, and more.
Many web hosting providers include Installatron through their web hosting control panel. If Installatron is not available from your provider, you can use Installatron directly from Installatron.com.
Here's how to install WordPress through your web hosting provider's control panel:
Here's how to install WordPress using Installatron.com:
For installation instructions in other languages, see WordPress in Your Language.
Use these instruction for setting up a local server environment for testing and development.
Installing WordPress locally is usually meant for the purpose of development. Those interested in development should follow the instructions below and download WordPress locally.
You may find that using a pre-integrated software appliance is a great way to get up and running with WordPress, especially in combination with virtual machine software (e.g., VMWare, VirtualBox, Xen HVM, KVM).
Another software that can be used is Parallels, which you would have to pay for unlike virtual machine software. It allows you to run both Mac and Windows on your machine.
A software appliance allows users to altogether skip manual installation of WordPress and its dependencies, and instead deploy a self-contained system that requires little to no setup, in just a couple of minutes.
Unattended installation of WordPress on Ubuntu Server [2]
You can follow this guide by copy & pasting commands in a terminal to set up WordPress on a fresh Ubuntu Server 16.04 installation with nginx, PHP7, MySQL plus free SSL from LetsEncrypt.
You will not be prompted to enter any credentials or details like in other guides, everything is automated. You can even skip the installation wizard.
Installation of WordPress on Ubuntu Server
This install tutorial assumes you have terminal access and are comfortable inputting commands This tutorial assumes that
if you qualify for all of these, you are ready to install WordPress! if not, you can head over to this guide on how to install WordPress for regular people.
WP_DOMAINis going to be the fully qualified domain name for your site, which an example is provided. You should also choose a strong password for your
WP_ADMIN_PASSWORD.
WP_DOMAIN="blog.bvzzdesign.com" WP_ADMIN_USERNAME="admin" WP_ADMIN_PASSWORD="admin" WP_ADMIN_EMAIL="no@spam.org" WP_DB_NAME="wordpress" WP_DB_USERNAME="wordpress" WP_DB_PASSWORD="wordpress" WP_PATH="/var/www/wordpress" MYSQL_ROOT_PASSWORD="root"
now its time for us to install our software, for this we used nginx, PHP and MySQL. For those of you that prefer Apache, I will refer you to NGINX vs. Apache: Our View of a Decade-Old Question. For those of you who still prefer Apache, stay tuned for a future tutorial or refer to How To Install WordPress with LAMP on Ubuntu 16.04 .
By defaultmysql-serveris going to ask for the root password, and we automate that with
debconf-set-selections.
echo "mysql-server-5.7 mysql-server/root_password password $MYSQL_ROOT_PASSWORD" | sudo debconf-set-selections echo "mysql-server-5.7 mysql-server/root_password_again password $MYSQL_ROOT_PASSWORD" | sudo debconf-set-selections sudo apt install -y nginx mysql-server> there are some server configurations that have issues installing nginx, if you get errors on your nginx install running
sudo service apache2 stopwill fix those issues most of the time. Also, it may be fitting to your use case to disable apache at boot which can be achieved with
sudo systemctl disable apache2.serviceor configure apache2 to listen on a different port
now let's install PHP 7.2
first, we are going to add the apt repository and update it
sudo apt-get install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo add-apt-repository ppa:ondrej/nginx-mainline sudo apt update
next, we will run the command to install PHP 7.2 and the related modules.
sudo apt install php7.2-fpm php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-zip php7.2-curl
after installing the modules be sure to restart nginx and php7.2-fpm services to reload PHP configurations
sudo systemctl restart nginx.service sudo systemctl restart php7.2-fpm.service
first, we are going to create paths for our websites source code to be stored, and for our log files
sudo mkdir -p $WP_PATH/public $WP_PATH/logsand then we are going to create our config file for nginx, in this tutorial we use the
teecommand because later on, we are going to learn how to automate this process. if you prefer to edit this file by hand using a text editor, such as
vimor
nano, simply
sudo nano /etc/nginx/sites-available/blog.bvzzdesign.com
and then add the data by hand. otherwise copy and paste
sudo tee /etc/nginx/sites-available/$WP_DOMAIN <<EOF server { listen 80; listen [::]:80; server_name $WP_DOMAIN www.$WP_DOMAIN; root $WP_PATH/public; index index.php; access_log $WP_PATH/logs/access.log; error_log $WP_PATH/logs/error.log; location / { try_files \$uri \$uri/ /index.php?\$args; } location ~ \.php\$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.2-fpm.sock; } } EOFnow we are going to make a [symlink](https://en.wikipedia.org/wiki/Symbolic_link) from our newly created file located at
/etc/nginx/sites-available/$WP_DOMAINto
/etc/nginx/sites-enabled.
sudo ln -s /etc/nginx/sites-available/$WP_DOMAIN /etc/nginx/sites-enabled/
let's test our configuration for errors
sudo nginx -tand then restart the
systemdservice
sudo service nginx restart
oh no something went wrong!
If you have some issues with nginx, never fear! There are plenty of ways to debug
sudo journalctl -u nginx
sudo less /var/log/nginx/access.log
sudo less /var/log/nginx/error.log
sudo nginx -t
we are now going to create a user and database for wordpress
mysql -u root -p$MYSQL_ROOT_PASSWORD <<EOF CREATE USER '$WP_DB_USERNAME'@'localhost' IDENTIFIED BY '$WP_DB_PASSWORD'; CREATE DATABASE $WP_DB_NAME; GRANT ALL ON $WP_DB_NAME.* TO '$WP_DB_USERNAME'@'localhost'; EOF
ignore the warning that it is insecure to use passwords on the command line, and if you are curious on why that warning appears, refer to this post on serverfault.
The first step to using Let's Encrypt to obtain an SSL certificate is to install the Certbot software on your server.
Certbot is in very active development, so the Certbot packages provided by Ubuntu tend to be outdated. However, the Certbot developers maintain a Ubuntu software repository with up-to-date versions, so we'll use that repository instead.
First, add the repository.
sudo add-apt-repository ppa:certbot/certbot
now we update the package list to pick up the new repository's package info
sudo apt-get update
and now let's install certbot
sudo apt install python-certbot-nginx
now that certbot is installed, let's use certbot to install our SSL certificate for our domain
sudo certbot --nginx -d $WP_DOMAIN
certbot will then prompt you with a message asking for your email address used for urgent renewal and security notices
Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel): no@spam.com
then it will prompt you with a terms of service agreement, press A and then enter to accept
------------------------------------------------------------------------------- Please read the Terms of Service at https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must agree in order to register with the ACME server at https://acme-v01.api.letsencrypt.org/directory ------------------------------------------------------------------------------- (A)gree/(C)ancel:
it will then ask you if you would like to share your email with the Electronic Frontier Foundation press y or n and hit enter
------------------------------------------------------------------------------- Would you be willing to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about EFF and our work to encrypt the web, protect its users and defend digital rights. ------------------------------------------------------------------------------- (Y)es/(N)o:
then you will be prompted with an option to redirect all HTTP traffic to https thus removing HTTP traffic, normally I choose option 1 in this situation, but this is heavily dependent on your use case
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. ------------------------------------------------------------------------------- 1: No redirect - Make no further changes to the webserver configuration. 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for new sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration. ------------------------------------------------------------------------------- Select the appropriate number [1-2] then [enter] (press 'c' to cancel):
after you hit enter, the configuration will be updated and you should see a success message similar to this
IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at /etc/letsencrypt/live/example.com/fullchain.pem. Your cert will expire on 2017-10-23. To obtain a new or tweaked version of this certificate in the future, simply run certbot again with the "certonly" option. To non-interactively renew *all* of your certificates, run "certbot renew" - Your account credentials have been saved in your Certbot configuration directory at /etc/letsencrypt. You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups of this folder is ideal. - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
now let make sure that our auto-renewal is functional on our certbot script
sudo certbot renew --dry-run
If you see no errors, then congratulations you now have successfully installed an SSL certificate that will automatically renew
now that our system is configured for WordPress, we are ready to install it.
let's start with recreating the directory that will contain our source code, with a new directory with the correct permissions, and then change our working directory to that directory
sudo rm -rf $WP_PATH/public/ # !!! sudo mkdir -p $WP_PATH/public/ sudo chown -R $USER $WP_PATH/public/ cd $WP_PATH/public/
now we will download WordPress with wget, unarchive it, and remove the archive
wget https://wordpress.org/latest.tar.gz tar xf latest.tar.gz --strip-components=1 rm latest.tar.gz
we are now going to edit some configuration files using sed and echo
mv wp-config-sample.php wp-config.php sed -i s/database_name_here/$WP_DB_NAME/ wp-config.php sed -i s/username_here/$WP_DB_USERNAME/ wp-config.php sed -i s/password_here/$WP_DB_PASSWORD/ wp-config.php echo "define('FS_METHOD', 'direct');" >> wp-config.php
next lets change the ownership back to www-data to the directory that our source code is located
sudo chown -R www-data:www-data $WP_PATH/public/
finally we can update our username and password with a curl command
curl "http://$WP_DOMAIN/wp-admin/install.php?step=2" \ --data-urlencode "weblog_title=$WP_DOMAIN"\ --data-urlencode "user_name=$WP_ADMIN_USERNAME" \ --data-urlencode "admin_email=$WP_ADMIN_EMAIL" \ --data-urlencode "admin_password=$WP_ADMIN_PASSWORD" \ --data-urlencode "admin_password2=$WP_ADMIN_PASSWORD" \ --data-urlencode "pw_weak=1"
or do it manually by navigating to the domain name that you have set up
congratulations! you now have a working WordPress website!
If you don't have IIS on your computer or don't want to use it, you could use a WAMP Stack :
These stacks can be downloaded freely and set up all the bits you need on your computer to run a website. Once you have downloaded and installed WAMP, you can point your browser at localhost and use the link to phpmyadmin to create a database.
Then, in order to install WordPress, download the zip file, and extract it into the web directory for your WAMP installation (this is normally installed as c:\wamp\www). Finally visit http://localhost/wordpress to start the WordPress install. (Assuming you extracted into c:\wamp\www\wordpress).
Tip: If you want to use anything other than the default permalink structure on your install, make sure you enable the mod_rewrite module in WAMP. This can be enabled by clicking on the WAMP icon in the taskbar, then hover over Apache in the menu, then Apache modules and ensure that the rewrite_module item has a checkmark next to it.
You can also install WordPress on Ubuntu with one click WordPress Hosting on Atlantic.Net.
You can also install WordPress on Ubuntu with one click using this StackScript on Linode.
In less than 5 minutes from now, you will have your blog ready on your domain. You will install WordPress on your own domain as an Automated Process with ONE Click WordPress Installation feature from iPage hosting.
wp-cli is a great command line tool with which you can easily install and update WordPress and themes and extensions.