Saturday 21 December 2013

Cannot find the robot.txt anywhere in my file manager but the domain.com/robots.txt is working

In the wordpress website the robots.txt is automatically getting generated by the following script : function do_robots() {
header( 'Content-Type: text/plain; charset=utf-8' );

do_action( 'do_robotstxt' );

if ( '0' == get_option( 'blog_public' ) ) {
echo "User-agent: *\n";
echo "Disallow: /\n";
} else {
echo "User-agent: *\n";
echo "Disallow:\n";
}
}
in the file /functions.php which is under the /wp-includes/ folder. So you can modify the code to change the robots.txt settings.

If you do not wish to show the robots.txt file you can redirect it to the 404 error page using the .htaccess

Redirect 301 /robots.txt http://www.yoursite.com/404

Thursday 19 December 2013

Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error

Below error occurred while trying to connect to the WordPress.com under jetpack plugin in wp-admin panel:
Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error Details: The Jetpack server was unable to communicate with your site [HTTP 503]. Ask your web host if they allow connections from WordPress.com. If you need further assistance, contact Jetpack Support: http://jetpack.me/support/

Try disabling the maintenance plugins if you have enabled and try to connect it.
The maintenance plugins like : WP Maintenance Mode and ThemeFuse Maintenance Mode
Or try disabling all the plugins that you have recently added and try if it is getting connected.

Or try deactivating the Jetpack plugin and reactivate it again and try connecting it , this worked for me .

Also check if your domain name server is updated , or updated to the right hosting account. Also check if the A record is pointing correctly.

If this is not resolved the issue you will have to contact either the http://jetpack.me/support/ or the hosting provider to check if the port is blocked or the website is blocked.

Sunday 15 December 2013

MySQL database not appearing in cPanel but exists in the server

If a database exists but is not displayed in cPanel it likely is not being tracked by the db mapping system.

Check to see if database is listed in user.yaml by running the following command:
#cat /var/cpanel/databases/user.yaml 

If the result is as follows : 
No databases tracked:
root@server [~]# cat /var/cpanel/databases/tacct.yaml
---
MYSQL:
dbs: {}
dbusers: {}

Follow the below steps : 

To map missing databases and users run the following:

#/usr/local/cpanel/bin/dbmaptool cpanelusername --type mysql --databasename

#/usr/local/cpanel/bin/dbmaptool cpanelusername --type mysql –databaseuser

#/usr/local/cpanel/bin/dbmaptool cpanelusername --type mysql –databasename cpanelusername_databaseuser

After the above steps are executed check with the following command if the database has been mapped in the db mapping system.
#cat /var/cpanel/databases/abc.yaml
The result should be as follows : 
---
MYSQL:
dbs:
tacct_testdb: IP Address
dbusers: {}
owner: tacct
server: IP Address

Unable to create directory uploads/2013/12. Is its parent directory writable by the server?

Unable to create directory uploads/2013/12. Is its parent directory writable by the server ? Error while uploading the image under media in the WordPress admin panel.

Login to the WordPress admin panel

Go to Settings >> Media

Change the path to wp-content/uploads

The issue will be resolved.

If it did not resolve the issue , you can try changing the folder permission for the folders wp-content and wp-content/uploads to 777 in the cPanel .

Saturday 14 December 2013

How to check if the cron job is executed or not ?

Cron-related messages, including success and failure, are logged to /var/log/cron .

You can also take a look at /var/log/messages and watch the email account listed in /root/.forward as that is where cron error reports would usually show up.

The cron job path for the domain : /var/spool/cron/username

Tuesday 10 December 2013

Removing the mysqladmin root password for the MySQL


First stop the MySQL service by running the following command in the SSH
/etc/init.d/mysql stop

After that run the following command
mysqld_safe --skip-grant-tables &

After this the MySQL admin password will be removed and you can
directly access the MySQL with out the password.

Wednesday 4 December 2013

Setting the magic_quotes_gpc=off to install the Joomla


Login to the server of the account as a root.

Set the magic_quotes_gpc=off in the file /usr/local/lib/php.ini

For the shared server :
You can try creating the php.ini in the root document folder in the File Manager >> Public_html and add the code 
magic_quotes_gpc=off 

ERR_CONTENT_DECODING_FAILED

If you are getting the error as ERR_CONTENT_DECODING_FAILED while accessing the domain then add the below extension in php.ini  ++++++++...