Skip to content

Instantly share code, notes, and snippets.

View charlesbatista's full-sized avatar
🏠
Working from home

Charles Batista charlesbatista

🏠
Working from home
View GitHub Profile
@charlesbatista
charlesbatista / gist:1c3443a1e80c61dc7325cb8e2a117d9c
Created August 11, 2023 17:08
How to prevent WordPress from logging DEPRECATED errros on debug.log
1. Open the "load.php" file on "wp-includes" directory.
2. Find the line 572 and change:
From: error_reporting(E_ALL);
To: error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_STRICT);
3. If the WordPress is updated in the future, you must to change the line again.
@charlesbatista
charlesbatista / import-sql-files-command-line.txt
Last active February 14, 2023 20:13
How to import SQL files using command line
We're using MySQL database and XAMPP as our web server. In this case, I'm using Windows 11.
If you are struggling on importing big files to your database and you are getting any messages related to time of execution exceed or memory limit was reached,
try to use MySQL command line to help you get through it.
First of all, go to you mysql bin folder. In my case, it is:
- c:\xampp\mysql\bin.
And then you type:
- mysql.exe -u root -p database_name < C:\path_to_file\my_database.sql.