Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
|
wiki2:install_wordpress [2016/04/16 19:49] alfred [Allow permalinks] |
wiki2:install_wordpress [2020/05/09 09:25] (actual) |
||
|---|---|---|---|
| Línea 11: | Línea 11: | ||
| sudo /etc/init.d/apache2 restart | sudo /etc/init.d/apache2 restart | ||
| </code> | </code> | ||
| + | |||
| ==== Allow permalinks ==== | ==== Allow permalinks ==== | ||
| Línea 45: | Línea 46: | ||
| Hope this helps someone. Leave me a comment below. | Hope this helps someone. Leave me a comment below. | ||
| </code> | </code> | ||
| + | |||
| + | It allows php to change the .htaccess and then the wordpress admin resets it. | ||
| + | |||
| + | If it's not working probably would do when you change the permalink to ''index.php/%postname%/''. But it won't be pretty. So... | ||
| + | |||
| + | You will need to go to ''/etc/apache2/'' and change all the directories to... | ||
| + | <code> | ||
| + | <Directory var/www/> | ||
| + | Options FollowSymLinks | ||
| + | AllowOverride All | ||
| + | </Directory> | ||
| + | </code> | ||
| + | If it is not working, my change are these: | ||
| + | <code> | ||
| + | <Directory /> | ||
| + | Options FollowSymLinks | ||
| + | AllowOverride All | ||
| + | </Directory> | ||
| + | |||
| + | <Directory /usr/share> | ||
| + | AllowOverride None | ||
| + | Require all granted | ||
| + | </Directory> | ||
| + | <Directory /var/www/> | ||
| + | Options FollowSymLinks | ||
| + | AllowOverride All | ||
| + | </Directory> | ||
| + | |||
| + | #<Directory /srv/> | ||
| + | # Options Indexes FollowSymLinks | ||
| + | # AllowOverride None | ||
| + | # Require all granted | ||
| + | #</Directory> | ||
| + | </code> | ||
| + | |||
| + | It's ultra-important to **enable mod rewrite**: ''a2enmod rewrite'' | ||
| ==== Backup and restore ==== | ==== Backup and restore ==== | ||
| Línea 65: | Línea 102: | ||
| - ''chown -R www-data html'' | - ''chown -R www-data html'' | ||
| - ''chgrp -R www-data html'' | - ''chgrp -R www-data html'' | ||
| + | |||
| + | ==== Attacks ==== | ||
| + | |||
| + | It's possible to find in your ''/var/log/apache2/access.log'' a lot of lines like this: ''111.222.333.444:80 555.666.777.888 - - [01/Jan/2016:16:33:50 -0500] "POST /xmlrpc.php HTTP/1.0" 200 674 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"'' | ||
| + | |||
| + | <code> | ||
| + | <files xmlrpc.php> | ||
| + | order allow,deny | ||
| + | deny from all | ||
| + | </files> | ||
| + | </code> | ||
| + | |||
| + | ==== Problems ==== | ||
| + | |||
| + | Si mueves un site a otra url puedes hacer varias cosas, en el ''wp-config.php''. La mejor opción sea poner el RELOCATE, acceder y el mismo wordpress habrá arreglado las rutas. | ||
| + | <code> | ||
| + | define('RELOCATE',true); | ||
| + | </code> | ||
| + | |||
| + | <code> | ||
| + | define('WP_HOME','https://2017.foropoliamor.org'); | ||
| + | define('WP_SITEURL','https://2017.foropoliamor.org'); | ||
| + | </code> | ||
| + | |||
| + | Para actualizar las urls utiliza: ''Velvet Blues Update URLs plugin'', que se ubicará en herramientas. | ||
| + | |||
| + | ==== Cambiar password desde mysql ==== | ||
| + | <code> | ||
| + | UPDATE `blog_users` SET `user_pass`= MD5('yourpassword') WHERE `user_login`='david'; | ||
| + | </code> | ||
| + | |||