Notepad++ Append Text To Every Line

Notepad++ Append Text To Every Line

It is actually really simple, enter notepad++ with the file you want to edit and hit the key combination CTRL+F and a search window appears. Change the tab to  ‘Replace’. At the bottom left corner, change the search mode to ‘Regular expression’. Now under ‘Find what’, enter ^(.*)$, and under ‘Replace with’, enter $1whatevertextyouwantnotepad++texttoappend

The $1 will be the existing text found in the line, and so technically you could do more complex modifications such as (texttoprepend)$1(texttoappend)

It’s that simple !

Enjoyed the content ? Share it with your friends !

WordPress Code To Improve Bulk Insert Or Update Post Speed

WordPress Code To Improve Bulk Insert Or Update Post Speed

When you hit tens of thousands of posts in WordPress, the speed of wp_insert_post or wp_update_post gets significantly slower. To improve the speed, you simply add the following code and you will see that the speed improves significantly.

Add these two lines of code before your insert or update loop

wp_defer_term_counting(true); 
wp_defer_comment_counting(true);

And add these two lines after your insert or update loop

wp_defer_term_counting(false);
wp_defer_comment_counting(false);

By adding these few lines of code, you are temporarily disabling the term counts until all posts have been inserted or updated to speed up the process

Enjoyed the content ? Share it with your friends !