Different development environments (Mac & Windows)

You need to have 2 sets of settings one for if file_exists and one for else: if ( file_exists( dirname( __FILE__ ) . ‘/local-config.php’ ) ) { include( dirname( __FILE__ ) . ‘/local-config.php’ ); define( ‘WP_LOCAL_DEV’, true ); } else { define(‘WP_HOME’, ‘http://localhost:666/projectname/’); define(‘WP_SITEURL’, ‘http://localhost/foldername/wordpress/’); }

Moving online website to MAMP or dumb idea?

There are some awesome resources online to help you with this process. Good for you for setting up a local development environment. I think you will find it to be an awesome change to your workflow, but be prepared for some trial and error in getting it right. First of all, there is an excellent … Read more

Flatten media files in uploads directory via linux terminal eliminating thumbnails?

Warning: Please make a backup first, as this can do irreversable damage. Go to your uploads directory: cd /path/to/directory cp -r uploads uploads.backup Flatten the files in uploads directory: find * -type f -exec bash -c ‘file=${1#./}; echo mv “$file” “${file//\//_}”‘ _ ‘{}’ \; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2017/12/some-image-150×150.jpg —> 2017_12_some-image-150×150.jpg 2017/12/some-image-360×240.jpg —> 2017_12_some-image-360×240.jpg 2017/12/some-image-720×900.jpg —> 2017_12_some-image-720×900.jpg 2017/12/some-image.jpg … Read more

Multisites, upload issues, and iOS!

After 6 days of pure sadness, this ended up being the fix: http://www.technowut.com/2012/05/14/how-to-stream-videos-to-ios-devices-with-multisite-wordpress/ Here’s how to get it working on CentOS 6 with the packaged Apache httpd: Nils Maier wrote the module for Apache httpd. Download the source and take some time to review the docs there. Compile and install the module on the command … Read more

WordPress Permalinks on Mac OSX Server 5 (El Capitan)

I’d check a few things Apache2 logs open a terminal Check error logs at tail -f /var/log/apache2/error_log Check access logs at tail -f /var/log/apache2/access_log WordPress Check .htaccess has correct rules for basic setup enable wp debugging to see if you can log further errors when the redirect happens this is how you enable WP logging … Read more

How to remove “Connection Information” requirement on localhost install of WP on MACOSX

Have you tried updating the permissions for your WordPress files to 755 or 777? UPDATE 1 Thanks to @anu in the comments (~/Sites assumes you put websites are in the Mac’s default website directory): cd ~/Sites sudo chmod -R 777 * I just checked my httpd.conf file, which has the path /Applications/XAMPP/etc/httpd.conf and here is … Read more

WordPress Warning: preg_replace(): JIT compilation failed: no more memory

I added the following line to the php.ini and restarted Apache and it worked (Xampp on macOS): pcre.jit=0 This disables PCRE’s just-in-time compilation. Further information: http://php.net/manual/en/pcre.configuration.php#ini.pcre.jit If you can’t find the location of php.ini and are using Xampp, go to localhost and select the PHP information link and it is displayed there.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)