Wordpress Installation

Aus bknowledgebase
Zur Navigation springen Zur Suche springen

Installation von Wordpress auf eigenem Debian Server[Bearbeiten]

Geklaut aus Quelle: [1]

Zuvor wurde lediglich ein Debian Server aufgesetzt geupdated LAMP installiert und ein neuer User mit root Rechten ausgestattet

Server Setup[Bearbeiten]

Install Lamp Before working with WordPress, you need to have LAMP installed on your virtual private server. If you don't have the Linux, Apache, MySQL, PHP stack on your VPS, you can find the tutorial for setting it up in the LAMP tutorial.

  • If you are signed in as your new user and not in root, many of the commands in the tutorial above will need to be preceded by "sudo" in order to work.

Download and Setup WordPress on your VPS[Bearbeiten]

Download WordPress[Bearbeiten]

We can download WordPress straight from their website:

wget http://wordpress.org/latest.tar.gz

The next command will now download the zipped WordPress package straight to your user's home directory:

tar -xzvf latest.tar.gz

Wordpress Datenbank und Benutzer anlegen[Bearbeiten]

Nach dem Entpacken, sollten die Daten in /var/www/html/wordpress (o.ä.) liegen.

MySQL für WordPress[Bearbeiten]

An MySQL anmelden

mysql -u root -p

Jetzt die DB anlegen[Bearbeiten]

This tutorial will call its database wpdatabse for simplicity's sake-- feel free to give it whatever name you choose):

Query OK, 1 row affected (0.00 sec)

Then we need to create the new user. You can replace the database, name, and password, with whatever you prefer:

CREATE USER wpuser@localhost;
Query OK, 0 rows affected (0.00 sec)

Set the password for your new user:

SET PASSWORD FOR wpuser@localhost= PASSWORD("dbpassword");
Query OK, 0 rows affected (0.00 sec)

Finish up by granting all privileges to the new user. Without this command, the wordpress installer will not be able to start up:

wpuser@localhost IDENTIFIED BY 'dbpassword';
Query OK, 0 rows affected (0.00 sec)

Then refresh MySQL:

Query OK, 0 rows affected (0.00 sec)

Exit out of the MySQL shell:


Setup the WordPress Configuration[Bearbeiten]

The first step to is to copy the sample wordpress configuration file, located in the wordpress directory, into a new file which we will edit, thus creating a new usable wordpress config:

cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php

Then open the wordpress config:

sudo nano ~/wordpress/wp-config.php

Find the section that contains the field below and substitute in the correct name for your database, username, and password:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wpdatabase');

/** MySQL database username */
define('DB_USER', 'wpuser');

/** MySQL database password */
define('DB_PASSWORD', 'dbpassword');

Speichern und Schließen!

Rechte für wordpress Daten setzen[Bearbeiten]

www-data ist der Apache-User. Außerdem sollte man noch den persönlichen eigenen User in die Gruppe hinzufügen, damit dieser auf Zugriff hat.

sudo chown www-data:www-data /var/www/* -R 
sudo usermod -a -G www-data <username>

From here, WordPress has its own easy to follow installation form online.

However, the form does require a specific php module to run. If it is not yet installed on your server, download php-gd:

sudo apt-get install php5-gd

Access the WordPress Installation[Bearbeiten]

Once that is all done, the wordpress online installation page is up and waiting for you:

Access the page by adding /wp-admin/install.php to your site's domain or IP address (eg. example.com/wp-admin/install.php) and fill out the short online form (it should look like this).

Now you can access the main site by visiting your domain or IP address.

Happy Hacking