Wordpress: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 34: | Line 34: | ||
To enable ssh2 updating | To enable ssh2 updating | ||
apt-get install php-ssh2 | apt-get install php-ssh2 | ||
= Permissions = | |||
site/ + subdirs | |||
chown www-data:group site/ -R | |||
in site/ | |||
find . -type f -exec chmod 664 {} + | |||
find . -type d -exec chmod 775 {} + | |||
chmod 660 wp-config.php | |||
[https://www.wpbeginner.com/beginners-guide/why-you-cant-find-htaccess-file-on-your-wordpress-site/ Finding the .htacess] | |||
Settings » Permalinks page and click on ‘Save Changes’ button without changing anything. WordPress will now try to generate the .htaccess file for you. | |||
On some rare occasion, WordPress may not be able to generate the .htaccess file due to file permissions issue. | |||
In that case, it will show you a message at the bottom of the Settings » Permalinks page, saying that the ‘.htaccess file is not writeable’. | |||
You will need need to manually create the .htaccess file and add the required code inside it. |
Revision as of 10:21, 2 July 2019
Installation
chown -R wp-user:www-data /var/www/example.com/ cmhod 775 /var/www/example.com/wp-content/ -R su wp-user cd ~ mkdir ~/.ssh; cd ~/.ssh ssh-keygen -t rsa -b 4096 echo 'from="127.0.0.1"' `cat ~/.ssh/id_rsa.pub` > authorized_keys exit cp wp-config-sample.php wp-config.php chown 775 wp-config.php vi wp-config.php ----- add to end ---- define('FTP_PUBKEY','/home/wp-user/id_rsa.pub'); define('FTP_PRIVKEY','/home/wp-user/id_rsa'); define('FTP_USER','wp-user'); define('FTP_PASS',''); define('FTP_HOST','localhost'); ------ Also, set DB_NAME, DB_USER and DB_PASSWORD Visit https://api.wordpress.org/secret-key/1.1/salt/ And replace the AUTH_KEY etc with this Now visit the site
To enable ssh2 updating
apt-get install php-ssh2
Permissions
site/ + subdirs
chown www-data:group site/ -R
in site/
find . -type f -exec chmod 664 {} + find . -type d -exec chmod 775 {} + chmod 660 wp-config.php
Settings » Permalinks page and click on ‘Save Changes’ button without changing anything. WordPress will now try to generate the .htaccess file for you.
On some rare occasion, WordPress may not be able to generate the .htaccess file due to file permissions issue.
In that case, it will show you a message at the bottom of the Settings » Permalinks page, saying that the ‘.htaccess file is not writeable’.
You will need need to manually create the .htaccess file and add the required code inside it.