User Tools

Site Tools


wordpress_issues

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wordpress_issues [2016/03/03 17:13] – created luke7858wordpress_issues [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +=== Quick Wordpress Files Download ===
 +Change /var/www/html to the directory you wish to download the latest wordpress files and the following command will download the files
 +<sxh bash>
 +wget -O - https://wordpress.org/latest.tar.gz | tar -xzf - -C /var/www/html --strip-components=1
 +</sxh>
 +\\
 +\\
 === Wordpress Permissions === === Wordpress Permissions ===
 Replace ${WP_ROOT} with the directory location of wordpress. If you are already in the wp document root, replace with a dot . Replace ${WP_ROOT} with the directory location of wordpress. If you are already in the wp document root, replace with a dot .
Line 30: Line 37:
 \\ \\
 \\ \\
 +=== WP Memory Limit ===
 +To increase the memory limit for wordpress you should first change the php.ini file.
 +\\
 +\\
 +If that does not work you should add the following to your wp-config.php file
 +<sxh bash>
 +define( 'WP_MEMORY_LIMIT', '96M' );
 +</sxh>
 +Change the memory limit value as required 
 +\\
 +\\
 +
 === Changing Site URL === === Changing Site URL ===
 Check the current URL, first select the database with the 'use' command (eg. use live_database;): Check the current URL, first select the database with the 'use' command (eg. use live_database;):
Line 37: Line 56:
 Now we can update the URL: Now we can update the URL:
 <sxh bash> <sxh bash>
-UPDATE wp_options SET option_value = 'http://notes.lukeslinux.co.uk' WHERE option_name = 'siteurl' OR option_name = 'home';+UPDATE wp_options SET option_value = 'http://lukeslinux.co.uk' WHERE option_name = 'siteurl' OR option_name = 'home';
 </sxh> </sxh>
 \\ \\
 +=== Deterring wp-login attacks ===
 +Add the following to your htaccess.
 +\\
 +The following code stops any ip address posting to your wp-admin page that does not have a referrer or user-agent set.
 +\\
 +An example log entry is:
 +<sxh bash>
 +x.x.x.x - - [23/Aug/2016:17:25:40 +1000] "POST /wp-login.php HTTP/1.0" 403 214 "-" "-"
 +</sxh>
 +Code:
 +<sxh bash>
 +<IfModule mod_rewrite.c>
 +RewriteEngine on
 +RewriteCond %{REQUEST_METHOD} POST
 +RewriteCond %{HTTP_REFERER} !^https://(.*)?reaa\.com\.au [NC]
 +RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
 +RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
 +RewriteRule ^(.*)$ - [F,L]
 +</IfModule>
 +</sxh>
 +
 +
wordpress_issues.1457025188.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki