Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

Aug 1, 2016

wordpress woocommerce product image not found 404

This post has a second title: wordpress woocommerce lessons learned

Here's a list of things I did to solve issues with images not appearing on my wordpress store which uses the woocommerce plugin:


  • Properly set the 'location' block in nginx sites-available file.
  • Properly define file and folder ownership and privileges in the 'wp-content/uploads'.

Jul 28, 2016

wordpress plugin could not create directory

I installed the WooCommerce plugin in Wordpress but got this ugly looking error:
PayPal Express Checkout could not be installed (Could not create directory.). Please install it manually by clicking here.

I solved this problem by doing this:

  1. Update ownership of the plugin directory to include user and the correct group: chown -R username:www-data wp-content/plugins/
  2. Update the permissions of folders and files in the woocommerce directory: chmod -R 775 wp-content/plugins/woocommerce/
Problem solved. I deactivated and then re-activated the plugin and the error went away with Paypal express installed :)

Jul 18, 2016

wordpress cross-origin request blocked

Your web fonts can get really messed up if you don't properly define nginx to handle CORS.

This is the block I've included in my sites-enabled settings to take care of that:

location ~* \.(eot|ttf|woff|woff2)$ {
    add_header Access-Control-Allow-Origin *;
}
Source: How do I add access control allow origin in nginx

Jul 14, 2016

413 Request Entity Too Large Nginx

railscapistrano-413-request-entity-too-large-nginx-wordpress-error


Let's go straight to the point. You need to modify max file size settings at two locations: php.ini and nginx.conf

For php.ini:
1) Open php.ini: vi /etc/php5/fpm/php.ini
2) Find upload_max_filesize = 2M
3) Change to upload_max_filesize = 32M (or larger)
4) Save and close php.ini
5) Restart services: sudo service php5-fpm restart


For nginx.conf:
1) Open nginx.conf: vi /etc/nginx/nginx.conf
2) Add this line if you cannot find it in the "http", "server" or "location" block: client_max_body_size ;
3) Modify it to 32M (or whatever size you set  in php.ini) like this: client_max_body_size 32M;
4) Restart nginx: sudo service nginx restart

Jul 12, 2016

wordpress permalinks 404 nginx

You're ready to blog.

Your head is full of ideas, words.

You've decided on this awesome (everybody says so, at least) CMS called "Wordpress".

You installed mysql in under 3 minutes flat.

Then you decided Apache web server is for dinosaurs. You're going to use something way cooler called "nginx".

You finally got everything installed and fire up wordpress in the browser.

You log in, you see your blog. Hurray! You're just like the experts.

Then you click on  a link, any link, they all give you an ugly 404 page. What the heck?

This is how I solved it:

location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
}

Go to your `/etc/nginx/sites-enabled/sitename` file and paste that line in the `location /` block

Done.

Mar 2, 2015

Wordpress Edit Image Cannot Crop Issue

I'm using Wordpress 4.1.1 at the HRISAdvisor.com website and am having serious problems with editing images using the built-in features.

What I get is a broken-link icon and none of the edit image buttons work.

Banner will redirect to landing page with technology courses.

Wordpress Support is of no help because everyone seems to have this problem "Resolved" which I think is weird. Weird because I have tried everything including installing a fresh copy with no plugins, no new themes, ie fresh from the start.

I think there is an error in the php code but I will have to take some time to come to terms with php itself before I can nail the root cause.

Just to keep this on my list. Will return.

Feb 26, 2015

Wordpress: Error establishing a database connection

A number of things can cause this error.

1) Misconfiguration

First to go to http://<wordpress site>/wp-admin

Wp-admin code will give you some hints to see whether the issue is with username and password or the db_name.

For my case, the db_name in wp-config.php was not exactly the same as the db_name I had in mysql. So it was a quick fix.

2) Low disk space

I recently ran into this situation. Mysql would simply fail to start.

Definitely check free space available when you are troubleshooting this message. Rule this one out quickly.