Cannot Add Posts To WordPress in linux

One of our WordPress Hosting clients had some problem while logging into WordPress admin using cPanel. A Linux customer whenever tried to post a new post using WordPress admin, always failed to do so. The file just kept on uploading whereas uploading never completed. The client tried different internet connections but the problem persisted. So the issue was discovered to be at the web hosting end.  On complete analysis of firewall and iptables configuration, we came to know that the IP is blocked whenever it tries to upload any data using WordPress.

When I started on solving the issue. The troubleshooting phase started with deactivating the CSF and uninstalling iptables from the server. It solved the issue, but it was a temporary solution as another program called “OSSEC” reinstalled iptables and CSF every day. So, the culprit was “OSSEC”, we started reading OSSEC rule files and configuration files, but could not understand the issue behind the problem. So, I came back to IP Tables configuration, I read the log from “/var/log/messages”, there we noticed that the WordPress script tried to change the memory limits which resulted in IP block. I changed the memory limit to 256 M in “php.ini”. Then reinstalled CSF and iptables. The issue was solved. Now the WordPress admin could post anything.




1-      Check if the IP appears in iptables list with DROP status.

2-      Stop CSF using “csf –x”.

3-      Uninstall iptables using “yum erase iptables”.

4-      Read the “/var/log/messages” for reason of IP being blocked.

5-      The reason would be like “The script tried to change the memory limit to xxx “. (Where xxx is any number).

6-      Go to php.ini or PHP Configuration Editor in whm; change the memory limit to xxx.

7-      Reinstall iptables using “yum install iptables”.

8-      Enable CSF using command “csf –e”.

9-      The issue is solved.

Leave a Comment