Laravel Migration Rollback fails

Most of the laravel beginners face issues with migration, mostly the migration works but the rollback fails.
Here are a curated list of possibilities and work arounds for the same.

  1. You have changed table structure manually after migration – You are never expected to do this – All changes to the db structure be only through migrations.
  2. You have changed the migration filename or classname after migration
  3. Autoload failure [Class Not found ]. Normally after creating a migration the migrate works but on rollback it will be depending on the composer autoloader which fails to load the class, so just by refreshing the autoload file you will be able to get hold of the stuff. just go to the root folder and run “composer dumpautoload” you’re good to go then!

If you have any problem with migrations feel free to ask in the below comment section.

How to stop WordPress asking for ftp details when installing or updating a theme/plugin

Is wordpress asking for ftp credentials, wordpress asking for FTP username and Password when you try to install a plugin or a theme?

Why it happens?

WordPress does not have the necessary permissions to modify the filesystem directly, as its owned by the ftp user or the root user which created the files inside the wordpress directory, Thats why wordpress is asking for the FTP credentials so that it can try to do what it needs to via FTP.

Whats the Solution?

Login to ssh via putty, Run

$ ps aux
wordpress asking for ftp credentials

wordpress asking for ftp credentials

identify the user by which apache / httpd runs in latest version of apache2 the user will be www-data in some it will be other user ( do replace www-data in the below command with corresponding username, also if you are using any other directory for the wordpress installation replace /var/www with that also as well )

$ sudo chown -R /var/www www-data
 

And you are done.  Now wordpress wont be asking for ftp details while installing or updating themes and plugins or for the core wordpress update. It will do all it itsown 🙂

 

 

 

 

Views Counter – Free WordPress Plugin

Description:

This plugin will count hits/views to each and every post/page you have on your wordpress blog and it will also show you the counts in admin post/page listing and in front-end (optional-see configuration/settings page).

Wordpress hits / views counter plugin

WordPress hits / views counter plugin

Why should I use this:

You can analyze which all of your posts are getting trafiic, inside wordpress itself for a better and quick comparison between the posts.

Can i customize the display css on front end?

Oh yes! i understand that everybody would like to see their blog on their design expectations

Using these classes in your css file you can customize the way you want.

.vc-container
.vc-container .vc-views-value

Is it free?

Yes it free to download, use and modify!

Is it heavy, Will it slowdown my website?

Never! . Plugin is just 3kb and around 20-30 lines of light code. Your website will not be slow down. Assured!

How to use:

  1. Download the zip file extract the contents and copy paste the “views-counter” directory to <your website root>/wp-content/plugins/
  2. Goto Plugins in Wp-admin -> Click Activate Plugin

OR

use upload functionality in wordpress

Where to Download:

Click Here to download

 

 

 

 

No – Follow Free WordPress Plugin

Description:

No follow plugin will add rel=”external nofollow”. It will prevent link juice getting passed from your site to other websites linked from your content.

Why should I use this:

If your link juice gets passed to other sites. Your chance of getting ranked higher will get reduced and also your content will be indexed slowly if you have a lot of followed outbound links.

Is it free?

Yes it free to download, use and modify!

Is it heavy, Will it slowdown my website?

Never! . Plugin is just 20-30 lines of light code. Your website will not be slow down. Assured!

How to use:

  1. Download the zip file extract the contents and copy paste the “no-follow” directory to <your website root>/wp-content/plugins/
  2. Goto Plugins in Wp-admin -> Click Activate Plugin

OR

use upload functionality in wordpress

Where to Download:

Click Here to download