Kako postaviti WordPress autentifikaciju sa dva faktora

 

U ovom vodiču ćemo vam pružiti korak-po-korak upute o tome kako da podesite dva-faktorsku autentifikaciju na VordPress veb lokaciji, hostovana na CentOS 7 VPS. Postoji mnogo dvostepenih autentikacija WordPress dodataka dostupnih u spremištu WordPress.org plugina, ali u svrhu ovog tutoriala, instaliramo i podesite Google Authenticator plugin za WordPress.

1. Ažurirajte OS pakete

Pre nego što započnete sa procedurom instalacije, ažurirajte operativne OS pakete sa najnovijim dostupnim paketima tako što ćete izvršiti sljedeće naredbe:

sudo yum očistiti sve sudo yum ažuriranje

2. Instalirajte PHP 7

CentOS 7 ima podrazumevano instaliran PHP 5.4. Mi možemo ukloniti PHP 5.4 i instalirati PHP 7.1 verziju. Da biste to uradili, provjerite koji su PHP 5.4 paketi instalirani na serveru i uklonite ih:

sudo rpm -qa | grep php php-cli-5.4.16-42.el7.x86_64 php-pdo-5.4.16-42.el7.x86_64 php-common-5.4.16-42.el7.x86_64 php-5.4.16-42.el7.x86_64 sudo yum ukloniti php php- cli php-common php-pdo

Zatim instalirajte PHP 7.1 verziju:

sudo rpm -Uvh https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-15.ius.centos7.noarch.rpm sudo yum update sudo yum instalirati php71u php71u- devel php71u-gd php71u-pdo php71u-mysqlnd php71u-xml php71u-mcrypt php71u-intl php71u-mbstring php71u-json php71u-iconv php71u-opcache php71u-imap php71u-sapun

3. Kreirajte novu bazu podataka

mysql -u root -p MariaDB [(none)]> CREATE DATABASE wordpress; MariaDB [(none)]> DODELITE SVE PRIVILEGE NA Wordpressu. * TO 'wordpress' @ 'localhost' IDENTIFIED BY 'Y0urPa55w0rd'; MariaDB [(none)]> privilegije za ispiranje; MariaDB [(none)]> quit;

4. Kreirajte novi virtuelni host u Apache-u:

vi /etc/httpd/conf.d/wordpress.conf

Dodajte sledeće redove i sačuvajte datoteku:

<VirtualHost *: 80> ServerName yourdomain.com ServerAlias ​​www.yourdomain.com ServerAdmin [email protected] DocumentRoot / var / www / html / wordpress / <Directory / var / www / html / wordpress> Opcije Indeksi FollowSymLinks MultiViews AllowOverride All < Directory> ErrorLog /var/www/html/wordpress/logs/yourdomain.com_error.log CustomLog /var/www/html/wordpress/logs/yourdomain.com_access.log kombinovani </ VirtualHost>

5. Instalirajte WordPress

Preuzmite najnoviju verziju WordPress-a i izvadite je na server:

cd / opt / wget https://wordpress.org/latest.zip unzip latest.zip mv Wordpress / var / www / html / wordpress /

Postavite odgovarajuće dozvole za datoteke i direktorije WordPressa:

sudo chown -R Apache: apache / var / www / html /

Izmenite PHP konfiguracionu datoteku i dodajte / modifikujte sledeća podešavanja (promenite vremensku zonu prema vašoj trenutnoj zoni):

memory_limit = 512M date.timezone = SAD / Čikago

Ponovo pokrenite Apache uslugu kako bi promjene stupile na snagu:

sudo systemctl restart httpd

Otvorite http://yourdomain.com u omiljenom web pregledaču i pratite jednostavna uputstva za završetak instalacije WordPress-a.

6. Instalirajte Google Authenticator dodatak

Log in to your WordPress dashboard and install the Google Authenticator plugin by clicking on the ‘Add New’ button from the Plugins menu, then activate it.

Go to Users -> your user (Admin) >> edit >> Google Authenticator Settings >> check ‘Active’ and ‘Relaxed mode’ >> Create new secret , write down the secret on a piece of paper and store it in a safe place. Then, click on the ‘Show QR code’ button next to the ‘Create new secret’ button and scan the generated QR code with your phone.

Set-up-WordPress-Two-Factor-Authentication

Click on the ‘Update profile’ button at the bottom of the page for the changes to take effect.

7. Proverite da li WordPress Authenticator za dva faktora radi

Da biste testirali da li je dvostepena autentikacija ispravno postavljena, odjavite se sa BackPress-a za WordPress, otvorite http://yourdomain.com/wp-admin i unesite svoje korisničko ime, lozinku i Google Authenticator kod.

WordPress-two-way-authenticator-wordpress-login

That’s it, your WordPress website is now using a two-factor authentication and it is a little more secure now.

Google Authenticator for WordPressAko koristite neku od naših WordPress hosting usluge, you can simply ask our expert Linux admins to enable two-factor authentication on your WordPress site for you. They are available 24×7 and will take care of your request immediately.

 

izvor

Oglasi

Ostavite odgovor

GTranslate Your license is inactive or expired, please subscribe again!