Alicia Online: Step-by-step guide on how to run it on Windows 7 Professional / Windows 7 Home using Vistalizator
 

Alicia Online: Step-by-step guide on how to run it on Windows 7 Professional / Windows 7 Home using Vistalizator

 
Cat Cosplay Made Out of Grapefruit – There are more pics than everyone thought!
 

Cat Cosplay Made Out of Grapefruit – There are more pics than everyone thought!

 
Best Cat Cosplay Ever!
 

Best Cat Cosplay Ever!

 

Connecting WordPress to a local FTP to allow automatic upgrades and plugin installs on XAMPP

How to setup a local copy of WordPress with XAMPPAnother post of my “XAMPP vs local WordPress installation ” knowledge. The first was How to setup a local copy of WordPress with XAMPP where questions like “what is XAMPP?” and “why would someone need a local copy of WordPress?” and even why am i writing this, are addressed. Go there if you’re not sure. This post is addressing an error that crops up on WordPress quite often – when WordPress can’t connect to a local FTP, and so automatic plugin and theme installing and upgrading is not working. Unfortunately, i couldn’t find a single solution and had to patch it up from different sources. Here are the results.

The problem

“Plugin could not be deleted due to an error”, “Could not fully remove the plugin(s)” or “Unable to locate wp-content” (or some other folder for that matter). That’s what you get when WordPress is not connected to FTP at all or the connection is somehow screwed, so you can’t install anything automatically, which is a pain. Another problem is that it asks for your FTP credentials each time you want to add a plugin or something, even if it wouldn’t work and nothing would be added, it still asks each time.

How to fix it

Now, there are two parts to the fix – to make WordPress shut up and grab your FTP credentials from somewhere when it wants them, and to actually make the FTP connection work.

Go to where your local copy of WordPress is installed (usually something/xampp/htdocs/wordpress/) and open wp-config.php in any editor that is NOT MS Word.

Copy-paste this code in there:

//*added ftp login credentials to avoid WordPress asking for FTP details every time I wanted to upgrade a plugin*

define(‘FS_METHOD’, ‘ftpsockets’);

define(‘FTP_BASE’, ‘wordpress/’);

define(‘FTP_CONTENT_DIR’, ‘wordpress/wp-content/’);

define(‘FTP_PLUGIN_DIR ‘, ‘wordpress/wp-content/plugins/’);

define(‘FTP_HOST’, ‘ftp://’);

define(‘FTP_USER’, ”);

define(‘FTP_PASS’, ”);

//*If you can use a SSL connection set this to true*

define(‘FTP_SSL’, true);

define(‘WP_ALLOW_REPAIR’, true);

Then edit it:

define(‘FTP_BASE’, ”);, define(‘FTP_CONTENT_DIR’, ”); and define(‘FTP_PLUGIN_DIR ‘, ”); all have paths to your WordPress folder. If it is called something other than WordPress, then edit it.

define(‘FTP_HOST’, ‘ftp://’); is your local IP address, something like 192.168.1.0 – don’t copy this one, last digit (0 in this case) is the number your computer gets in local network, it could be anything. Local IP can be found in Network settings of your OS.

define(‘FTP_USER’, ”); is the username you are logged under in your OS. You see it each time you turn on your computer.

define(‘FTP_PASS’, ”); is the password you’re using with the above username.

define(‘FTP_SSL’, true); – to use secured connection, if something doesn’t works, try deleting this line.

define(‘WP_ALLOW_REPAIR’, true); – not exactly related to the problems we’re trying to fix here, but a helpful thing nonetheless, allows WordPress to repair its database automatically without asking you when it things something’s wrong with it.

The results

WordPress knows your FTP credentials and won’t ask each time it needs them, it also knows where it is (folder-wise) and will always know where to put downloaded plugins and stuff. Don’t forget to save wp-config.php!

Wordpress website enhanced by true google 404