Tuesday, August 9, 2011

How to Setup reCaptcha Plugin System-Wide/Buddypress

Just to Correct Installation Procedure on:
Wordpress Site

After you Moved the "wp-recaptcha.php"
you have to Edit the file to change Required's Path...
On Unix-like Systems you can simply edit your file with:
pico wp-recaptcha.php
Change 2 lines:
require_once('recaptcha.php') --> require_once('wp-recaptcha/recaptcha.php')
require_once('mailhide.php') --> require_once('wp-recaptcha/mailhide.php')

Now you can proceed to Install the System Wide Plugin :)

Friday, August 5, 2011

How to Setup Wordpress with Remote MySQL Database Access

If you are trying to Develop on Local machine and Use the Remote Hosted MySQL Database try to Follow this Procedure to Enable MySQL Remote Access by Wordpress:

  1. Enable MySQL Remote Access
    • On CPanel Go:
       Databases >> Remote MySQL
      Then Insert your IP
    • On Amazon Ec2:
      On Security Group Open the 3306 Port
      Then Create a User with Credential to Login from Net...
      Example:
      GRANT ALL PRIVILEGES ON *.* TO bob@’%’ identified by “yourpasswordhere”;

  2. Check if you are able to Cnnect to Database from Terminal:

    mysql -u yourMySQLUser -h xxx.xxx.xxx.xxx -p
  3. Change settings in wp-config.php:

    define('DB_HOST', 'xxx.xxx.xxx.xxx:port'); // or
    define('DB_HOST', 'db.domain.com:port');

    (Default port: 3306)

Monday, June 13, 2011

How to Install Wordpress 3

Prerequisites:
-Apache
-MySQL

1) Proceed to Create your MySQL Database
sudo mysql -uroot -p
>create database wordpress;
>quit
2) Create you Wordpress Virtualhost
sudo pico /etc/hosts
Insert:
127.0.0.1   wordpress

sudo pico /path/to/apache2/conf/extra/httpd-vhosts.conf
Insert:

<virtualhost *:80>
   DocumentRoot "/path/to/wordpress"
   ServerName wordpress
   <directory path="" to="" wordpress="">
     Allow from all
   </directory>
</virtualhost>   


To activate this newly created Virtualhost you need to Restart Apache
3) Download Wordpress, Unzip it
cd /path/to
wget http://wordpress.org/latest.zip
sudo unzip wordpress*zip
4) Give it the Right Permissions
To set permissions for Directories:
sudo find /path/to/wordpress -type d | xargs chmod 755
To set permissions for Files:
sudo find /path/to/wordpress -type f -exec chmod 744 {} \;
5) Generate yours API Keys
Open a Browser's Window and type in the Address:
http://api.wordpress.org/secret-key/1.1/
Copy all the Output Given in the Window.
6) Create and Edit your Configuration script
cd wordpress
sudo mv wp-config-sample.php wp-config.php
Next you need to Edit wp-config.php
Select the lines containing:
define('AUTH_KEY',        'Abracadabra1');
define('SECURE_AUTH_KEY', 'Abracadabra2');
define('LOGGED_IN_KEY',   'Abracadabra3');
define('NONCE_KEY',       'Abracadabra4');

Paste in the API's Keys of Step 5);

Next you Need to Substitute the Right Values for:
define('DB_NAME', 'yourDBName');
define('DB_USER', 'yourDBUser');
define('DB_PASSWORD', 'yourDBPass');
define('DB_HOST', 'yourHostName');


Save.

7) Start Wordpress Installation
Open a Browser's Window and type in the Address:
http://wordpress


Good Luck!

How to set permissions in Wordpress

To set permissions for Directories:
sudo find /path/to/wordpress -type d | xargs chmod 755
To set permissions for Files:
sudo find /path/to/wordpress -type f -exec chmod 744 {} \;

Tuesday, June 7, 2011

How to Reset Wordpress URL

If you have changed you URL and you can't access any more your site:

1) Edit wp-login.php
Just after the line "require( dirname(__FILE__) . '/wp-load.php' );"
Insert:
//FIXME: do comment/remove these hack lines. (once the database is updated)
  update_option('siteurl', 'YourFirstURL' );
  update_option('home', 'YourFirstURL' );
  

2) Edit index.php to Default

Now you can open on a Browser your First Wordpress URL.

After you need to Remove the lines inserted in wp-login.php

Got it from here:Codex