Tag: Wordpress

  • Fix incorrect client IP for WordPress behind reverse proxy

    If you are running WordPress behind a reverse proxy, you will need to add the below code to the top of `wp-config.php`: {{{ // Alter `REMOTE_ADDR` header to `HTTP_X_FORWARDED_FOR` if it exists. if($_SERVER[‘HTTP_X_FORWARDED_FOR’]) { $xaddr = explode(‘,’,$_SERVER[‘HTTP_X_FORWARDED_FOR’]); $_SERVER[‘REMOTE_ADDR’] = $xaddr[0]; } }}}

  • WordPress Setup – Ubuntu 12.10

    Requires a configured web server 1. WordPress was surprisingly simple to setup: apt-get install wordpress 2. Symlink wordpress to web directory ln -s /usr/share/wordpress /var/www/wordpress 3. Run setup script. (-n seems to be the database to create and the final option is the domain) /usr/share/doc/wordpress/examples/setup-mysql -n wordpress domain.com 4. Permissions chown -R www-data /usr/share/wordpress \ […]