Title: Database Error
Last modified: June 20, 2021

---

# Database Error

 *  Resolved [afnana](https://wordpress.org/support/users/afnana/)
 * (@afnana)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/database-error-341/)
 * I added chinese translation and change all strings from english to chinese,but
   when i clicked on chinese flag,it gives me database establishing error. Can someone
   help me out please? Above is thesite link on which i am working.
    Thank you in
   advance
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-error-341%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Cristian Draghia](https://wordpress.org/support/users/cristiandraghia/)
 * (@cristiandraghia)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/database-error-341/#post-14578122)
 * Hello tehre,
 * The problem seems to be the server; not allowing the website to access the database
   through “trp-ajax”
    But the code below should be a temporary fix (It will switch
   to admin-ajax.php)
 * Create an empty plugin like this: [https://gist.github.com/sareiodata/76f701e01db6685829db](https://gist.github.com/sareiodata/76f701e01db6685829db)
   
   Add the following code to the end of it: /* * Revert to WP admin ajax instead
   of custom ajax url */ add_filter( ‘trp_custom_ajax_url’, ‘trpc_use_wp_admin_ajax’);
   function trpc_use_wp_admin_ajax() { return admin_url( ‘admin-ajax.php’ ); }
 * Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip
   archive with it and install it via the WordPress plugin upload functionality.
 * Best regards,
    Cristian
    -  This reply was modified 4 years, 11 months ago by [Cristian Draghia](https://wordpress.org/support/users/cristiandraghia/).
 *  [Denis](https://wordpress.org/support/users/sdenis/)
 * (@sdenis)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/database-error-341/#post-14634646)
 * Since more than 6 days have passed since my colleague answered this ticket, we
   will close it and if you encounter other problems or have a question regarding
   TranslatePress, please create another ticket with the problem in question.
 * Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Database Error’ is closed to new replies.

 * ![](https://ps.w.org/translatepress-multilingual/assets/icon.svg?rev=3166541)
 * [TranslatePress - Translate Multilingual sites with AI Translation](https://wordpress.org/plugins/translatepress-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/translatepress-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/translatepress-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/translatepress-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/translatepress-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/translatepress-multilingual/reviews/)

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)

 * 2 replies
 * 3 participants
 * Last reply from: [Denis](https://wordpress.org/support/users/sdenis/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/database-error-341/#post-14634646)
 * Status: resolved