How to set locale in Ubuntu / Debian

After a clean Debian/Ubuntu install, I get the following error “LC_ALL to default locale: No such file or directory”.

Answer:  Type the following in terminal to get rid of that error,

sudo apt-get install language-pack-en-base

sudo dpkg-reconfigure locales

Other options it is to run:

 # locale-gen 

You will get

 Generating locales (this might take a while)...
   en_US.UTF-8... done
Generation complete. 

Enjoy.

Set WordPress file permissions and FS method

Metod to set file permissions and FS method in wordpress. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.

Change the owner of the wordpress directory and its contents to apache on Centos 7.  Keep the group as staff, a group to which your user account belongs and give write permissions to the group.

First Step.

[root@mailx work]# cd  /var/www/html
[root@mailx html]# chown -R apache.  wordpress-site2
[root@mailx html]# chmod -R g+w   wordpress-site2

Second Step.

Add this to your wp-config.php at the end file.

define(‘FS_METHOD’, ‘direct’);