{"id":1384,"date":"2024-10-14T19:19:10","date_gmt":"2024-10-14T17:19:10","guid":{"rendered":"https:\/\/www.stephan-lubahn.de\/?p=1384"},"modified":"2024-11-22T19:18:56","modified_gmt":"2024-11-22T18:18:56","slug":"wordpress-auf-anderen-server-einrichten","status":"publish","type":"post","link":"https:\/\/www.stephan-lubahn.de\/?p=1384","title":{"rendered":"WordPress auf anderen Server einrichten"},"content":{"rendered":"\n<p>FTP Server installieren<br>sudo apt install vsftpd<br>Hostnamen ermitteln -&gt; hostnamectl<\/p>\n\n\n\n<p>MySql Server installieren<br>sudo apt install mysql-server<br>Status \u00fcberpr\u00fcfen -&gt; sudo service mysql status QUIT mit der Eingabe q<br>Netzwerkstatus -&gt; sudo ss -tap | grep mysql<br>Die Datei \/etc\/mysql\/<br>\/etc\/mysql\/mysql.conf.d\/mysqld.cnf den Bind Eintrag anpassen auf die Server IP<br>bind-address            = 192.168.0.5<\/p>\n\n\n\n<p>DBeaver ce Installieren<\/p>\n\n\n\n<p>sudo snap install curl<br><\/p>\n\n\n\n<p>Abh\u00e4ngigkeiten Installieren<br>sudo apt update<br>sudo apt install apache2 \\<br>                 ghostscript \\<br>                 libapache2-mod-php \\<br>                 php \\<br>                 php-bcmath \\<br>                 php-curl \\<br>                 php-imagick \\<br>                 php-intl \\<br>                 php-json \\<br>                 php-mbstring \\<br>                 php-mysql \\<br>                 php-xml \\<br>                 php-zip<br><\/p>\n\n\n\n<p>Install WordPress<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir -p \/srv\/www\nsudo chown www-data: \/srv\/www\ncurl https:\/\/wordpress.org\/latest.tar.gz | sudo -u www-data tar zx -C \/srv\/www<\/code><\/pre>\n\n\n\n<p>Create Apache site for WordPress. Create <code>\/etc\/apache2\/sites-available\/wordpress.conf<\/code> with following lines:<\/p>\n\n\n\n<p>cd \/etc\/apache2\/sites-available<br>$ sudo nano wordpress.conf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80&gt;\n    DocumentRoot \/srv\/www\/wordpress\n    &lt;Directory \/srv\/www\/wordpress&gt;\n        Options FollowSymLinks\n        AllowOverride Limit Options FileInfo\n        DirectoryIndex index.php\n        Require all granted\n    &lt;\/Directory&gt;\n    &lt;Directory \/srv\/www\/wordpress\/wp-content&gt;\n        Options FollowSymLinks\n        Require all granted\n    &lt;\/Directory&gt;\n&lt;\/VirtualHost&gt;\n<\/code><\/pre>\n\n\n\n<p><br>sudo a2ensite wordpress<br>systemctl reload apache2<br>sudo a2enmod rewrite<br>systemctl reload apache2<br>sudo a2dissite 000-default<br>systemctl reload apache2<br>sudo service apache2 reload<\/p>\n\n\n\n<p>Configure database<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo mysql -u root\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 7\nServer version: 5.7.20-0ubuntu0.16.04.1 (Ubuntu)\n\nCopyright (c) 2000, 2017, Oracle and\/or its affiliates. All rights reserved.\n\nOracle is a registered trademark of Oracle Corporation and\/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nmysql&gt; CREATE DATABASE wordpress;\nQuery OK, 1 row affected (0,00 sec)\n\nmysql&gt; CREATE USER wordpress@localhost IDENTIFIED BY '&lt;your-password&gt;';\nQuery OK, 1 row affected (0,00 sec)\n\nmysql&gt; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER\n    -&gt; ON wordpress.*\n    -&gt; TO wordpress@localhost;\nQuery OK, 1 row affected (0,00 sec)\n\nmysql&gt; FLUSH PRIVILEGES;\nQuery OK, 1 row affected (0,00 sec)\n\nmysql&gt; quit\nBye<\/code><\/pre>\n\n\n\n<p><br>Enable MySQL with  -&gt; <code>sudo service mysql start<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -u www-data cp \/srv\/www\/wordpress\/wp-config-sample.php \/srv\/www\/wordpress\/wp-config.php<\/code><\/pre>\n\n\n\n<p><br>Next, set the database credentials in the configuration file (do not replace database_name_here or username_here in the commands below. Do replace &lt;your-password&gt; with your database password.):<br><br>sudo -u www-data sed -i &#8217;s\/database_name_here\/wordpress\/&#8216; \/srv\/www\/wordpress\/wp-config.php<\/p>\n\n\n\n<p>sudo -u www-data sed -i &#8217;s\/username_here\/wordpress\/&#8216; \/srv\/www\/wordpress\/wp-config.php<\/p>\n\n\n\n<p><br>sudo -u www-data sed -i &#8217;s\/password_here\/\/&#8216; \/srv\/www\/wordpress\/wp-config.php<\/p>\n\n\n\n<p>sudo -u www-data nano \/srv\/www\/wordpress\/wp-config.php<br>Find the following:<br>define( &#8218;AUTH_KEY&#8216;,         &#8218;put your unique phrase here&#8216; );<br>define( &#8218;SECURE_AUTH_KEY&#8216;,  &#8218;put your unique phrase here&#8216; );<br>define( &#8218;LOGGED_IN_KEY&#8216;,    &#8218;put your unique phrase here&#8216; );<br>define( &#8218;NONCE_KEY&#8216;,        &#8218;put your unique phrase here&#8216; );<br>define( &#8218;AUTH_SALT&#8216;,        &#8218;put your unique phrase here&#8216; );<br>define( &#8218;SECURE_AUTH_SALT&#8216;, &#8218;put your unique phrase here&#8216; );<br>define( &#8218;LOGGED_IN_SALT&#8216;,   &#8218;put your unique phrase here&#8216; );<br>define( &#8218;NONCE_SALT&#8216;,       &#8218;put your unique phrase here&#8216; );<\/p>\n\n\n\n<p>Delete those lines (ctrl+k will delete a line each time you press the sequence). Then replace with the content of https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/. (This address is a randomiser that returns completely random keys each time it is opened.) This step is important to ensure that your site is not vulnerable to \u201cknown secrets\u201d attacks.<\/p>\n\n\n\n<p>Save and close the configuration file by typing ctrl+x followed by y then enter<\/p>\n\n\n\n<p>Das bedeutet die Zeilen define(&#8218;AUTH_KEY &#8230;. bis define(&#8218;NONCE -> l\u00f6schen und mit der ausgabe von <a href=\"https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/\">https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/<\/a> ersetzen.<br><br>Einfacher jedoch mit dem Texteditor da Nano eine eigene Zwischenablage hat.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>FTP Server installierensudo apt install vsftpdHostnamen ermitteln -&gt; hostnamectl MySql Server installierensudo apt install mysql-serverStatus \u00fcberpr\u00fcfen -&gt; sudo service mysql status QUIT mit der Eingabe qNetzwerkstatus -&gt; sudo ss -tap | grep mysqlDie Datei \/etc\/mysql\/\/etc\/mysql\/mysql.conf.d\/mysqld.cnf den Bind Eintrag anpassen auf &hellip; <a href=\"https:\/\/www.stephan-lubahn.de\/?p=1384\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[90],"tags":[130],"class_list":["post-1384","post","type-post","status-publish","format-standard","hentry","category-installation","tag-wordpress-installation"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=\/wp\/v2\/posts\/1384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1384"}],"version-history":[{"count":31,"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=\/wp\/v2\/posts\/1384\/revisions"}],"predecessor-version":[{"id":1490,"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=\/wp\/v2\/posts\/1384\/revisions\/1490"}],"wp:attachment":[{"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stephan-lubahn.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}