WordPress Errors and their solutions

Error:
$ sudo gzip -d /usr/share/doc/wordpress/examples/setup-mysql.gz
gzip: /usr/share/doc/wordpress/examples/setup-mysql.gz: No such file or directory

Sol:
The problem is the setup-mysql file has to be unzipped.
Code:
$ sudo gunzip /usr/share/doc/wordpress/examples/setup-mysql.gz
Then retry
$ sudo gzip -d /usr/share/doc/wordpress/examples/setup-mysql.gz
Problem will be solved!

Error:
Neither /etc/wordpress/config-localhost.php nor /etc/wordpress/config-localhost.php could be found.
Ensure one of them exists, is readable by the webserver and contains the right password/username.

Sol:
Create the file manually if it doesn’t exist.
But if it is there, then run
$ sudo ln -s /etc/wordpress/config-localhost.php /etc/wordpress/config-default.php

Error:
Error connecting to the Database

Sol:
Make a backup copy of wp-config.php file.
then run
$ sudo cp /usr/share/wordpress/wp-config-sample.php /usr/share/wordpress/wp-config.php
$ sudo gedit /usr/share/wordpress/wp-config.php
then enter your
database name
databsae user
database password
localhost name
save that file.

Error:
You can’t manually install themes and plugins and also automatic updates doesn’t work.

Sol:
For automatic updates to occur, the folder and all its files and subfolders must be owned by www-data:
$ sudo chown -R www-data /usr/share/wordpress
This command will automatically solve your theme and plugin installation problem.

Error:
Blank screen when you go to http://localhost/wordpress/

Sol:
This error usually occurs due to some faulty syntax or some irregularities with your file.
In the wp-config.php file, find the code
define(‘WP_DEBUG’, false);
set it to
define(‘WP_DEBUG’, true);
Now your browser will show the errors that could result in Blank Page Error.

Happy Pressing! 😀

Advertisements

2 thoughts on “WordPress Errors and their solutions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s