Mainos / Advertisement:

Ero sivun ”Wordpress/en” versioiden välillä

Kohteesta Taisto
Siirry navigaatioon Siirry hakuun
(Ak: Uusi sivu: Copy the text visible in your browser into that file, save it and then select "Run the Install".)
 
(11 välissä olevaa versiota samalta käyttäjältä ei näytetä)
Rivi 55: Rivi 55:
 
Copy the text visible in your browser into that file, save it and then select "Run the Install".
 
Copy the text visible in your browser into that file, save it and then select "Run the Install".
  
Voit myös asennusta helpottaen antaa www-data käyttäjän kirjoittaa wordpress hakemistoon:
+
You can also give the www-data user to write in the wordpress directory, which eases the installation a bunch:
  
 
   chown www-data %wordpressdir%/config
 
   chown www-data %wordpressdir%/config
Rivi 61: Rivi 61:
 
[[Tiedosto:Wordpress2.jpg]]
 
[[Tiedosto:Wordpress2.jpg]]
  
Sitten vain ''Install WordPress''
+
Then just "install WordPress"
  
Nyt blogi on valmis. Osoitteesta ''http://palvelimeniposoite/~johannes/wordpress/wp-admin/'' löytyy hallintapaneeli ja ''http://palvelimeniposoite/~johannes/wordpress/'' itse sivusto.
+
Now the blog is done. From the address ''http://serveripaddress/~johannes/wordpress/wp-admin/'' you can find the control panel and from ''http://serveripaddress/~johannes/wordpress/'' the site itself.
  
=== Kuvan lisäys ===
+
=== Adding pictures ===
  
Mennään hallintapaneeliin ja valitaan ''Media'' ja sitten ''Add New''. Minulle sivusto kuitenkin herjaa "''Unable to create directory wp-content/uploads/2014/09. Is its parent directory writable by the server?''"
+
We go to the control panel and select ''Media'' and then ''Add New''. For me the site gives an error, "''Unable to create directory wp-content/uploads/2014/09. Is it's parent directory writable by the server?''"
  
Voisimme tietysti pistää chmod 777 kyseiselle sijainnille, mutta se ei välttämättä olisi kovin fiksua. Teemme siis näin ->
+
We could of course put chmod 777 for the location in question, but that might not be very smart. Thus we do this ->
  
 
  cd /home/johannes/public_html/wordpress/
 
  cd /home/johannes/public_html/wordpress/
Rivi 75: Rivi 75:
 
  sudo chmod -R 755 wp-content
 
  sudo chmod -R 755 wp-content
  
Nyt pitäisi onnistua.
+
Now it should work.
  
== Lisätietoa ==
+
== Additional information ==
  
https://www.omaserveri.info/wordpressin-php-muistirajan-nostaminen/
+
https://www.omaserveri.info/wordpressin-php-muistirajan-nostaminen/ (finnish)
  
== Lähteitä ==
+
== Sources ==
  
http://tuukkamerilainen.com/?p=267
+
http://tuukkamerilainen.com/?p=267 (finnish)

Nykyinen versio 10. helmikuuta 2015 kello 13.38

Muut kielet:
English • ‎suomi

WordPress is a free and open source software blogging and content management tool which requires Apache2, php5 ja mysql.

Installation

First we install a LAMP server (Linux, apache2, php5, mysql). We also install the phpmyadmin tool which simplifies MySQL management.

aptitude install apache2 php5 mysql-server phpmyadmin

Create passwords if so prompted.

Phpmyadmin configuration

We go to the address "serveripaddress/phpmyadmin" and from there to privileges -> add a new user and select a correct username, host (local) and password. I also chose "Create database with same name and grant all privileges", then create a user.

Apache2 configuration

I want to create wordpress for a user called johannes. Thus I make johannes his own webpages into his own /home directory using userdir.

a2enmod userdir
service apache2 reload
mkdir /home/johannes/public_html

Installation and configuration of wordpress

Fetch the wordpress package:

cd /home/johannes/public_html/
wget https://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
ls

Using the Ls command the wordpress directory should now be visible.

In this phase as you try to go to http://ownaddress/~johannes/wordpress/ you will most likely be met with an error: php is not visible. It is caused by blocks defined in the php5 userdir directories. To fix it: nano /etc/apache2/mods-enabled/php5.conf

Comment the line below

#        php_admin_value engine Off
service apache2 reload

Now it should look better. Correct information: (the user and database which we created with phpmyadmin).

Wordpress.jpg


You will now get an error message. Create a configuration file and copy the following there:

nano /home/johannes/public_html/wordpress/wp-config.php

Copy the text visible in your browser into that file, save it and then select "Run the Install".

You can also give the www-data user to write in the wordpress directory, which eases the installation a bunch:

 chown www-data %wordpressdir%/config

Wordpress2.jpg

Then just "install WordPress"

Now the blog is done. From the address http://serveripaddress/~johannes/wordpress/wp-admin/ you can find the control panel and from http://serveripaddress/~johannes/wordpress/ the site itself.

Adding pictures

We go to the control panel and select Media and then Add New. For me the site gives an error, "Unable to create directory wp-content/uploads/2014/09. Is it's parent directory writable by the server?"

We could of course put chmod 777 for the location in question, but that might not be very smart. Thus we do this ->

cd /home/johannes/public_html/wordpress/
sudo chown -R www-data wp-content
sudo chmod -R 755 wp-content

Now it should work.

Additional information

https://www.omaserveri.info/wordpressin-php-muistirajan-nostaminen/ (finnish)

Sources

http://tuukkamerilainen.com/?p=267 (finnish)

Mainos / Advertisement: