[wordpress]How to install plugins and themes in local wordpress solution?

Installing the wordpress in local machine and hosting on webserver is quiet easy right?
 - Yes, we have so many tools in the Internet.

Then why you need this post?



Sometimes we do mistakes while installing the plugins and no idea what/where  we did wrong.


This is my experience while installing the wordpress plugins and themes in Ubuntu 16.04.


  Step-1: Go to wordpress website and download the tar.gz file
    
    



Step-2: Extract the file in your local machine.
Step-3: Install MySQL , apache2 server and create a database.


            Steps to install database.    
  •    Open terminal(ctrl+alt+t).
  •    Type below commands     
       sudo mysql -u [user_name] -p
              
 Hit the enter it will ask you the databse password.
  •     Create new database.
         create database [database_name];

Step-3: Copy all your extracted files in the var/www/html folder.
            then type the url in the browser http://localhost//wordpess/


That's all you have to do to install wordpress in local machine.

But here problem is -

When you try to install the plugins or themes it will ask you to FTP/webhost server details.
It means it won't allow you to install in the local machine it will force us to install in the remote server.

To install plugins in local machine add below line in you wp-config.php file.

     define('FS_METHOD', 'direct');

After this you might get one more problem with permission as by default apache server installs in your "var/" folder which needs root access.
So when you try to install the plugins or theme it won't allow you to install.

So give write permission to your "www" folder. 


     sudo chmod -R 777 www/wordpress

Now install the plugins and etc.






No comments:

Post a Comment