How to share /uploads/ directory with another site on the same server?

Well, what you want to achieve saving uploads in another domain? You want to share the uploads folder with another domain? Did you know you can use more than one domain (site) in a single WordPress Installation? It’s called Multisite: https://premium.wpmudev.org/blog/ultimate-guide-multisite/ To change the upload dir. Just use the filter upload_dir. It’s documented here: https://codex.wordpress.org/Plugin_API/Filter_Reference/upload_dir … Read more

Meaning of directories on Unix and Unix like systems

For more data on the layout of Linux file-systems, look at the Filesystem Hierarchy Standard (now at version 2.3, with the beta 3.0 version deployed on most recent distros). It does explain some of where the names came from: /bin – Binaries. /boot – Files required for booting. /dev – Device files. /etc – Et … Read more

Unable to locate WordPress content directory

All files should be owned by the actual user’s account, not the user account used for the httpd process. Group ownership is irrelevant unless there are specific group requirements for the web-server process permissions checking. This is not usually the case. All directories should be 755 or 750. All files should be 644 or 640. … Read more

how to change wp upload directory to another domain directory

Well, what you want to achieve saving uploads in another domain? You want to share the uploads folder with another domain? Did you know you can use more than one domain (site) in a single WordPress Installation? It’s called Multisite: https://premium.wpmudev.org/blog/ultimate-guide-multisite/ To change the upload dir. Just use the filter upload_dir. It’s documented here: https://codex.wordpress.org/Plugin_API/Filter_Reference/upload_dir … Read more

How to add a sub directory to WordPress single posts without affecting other post types?

If we look at the register_post_type documentation, in the rewrite option, there is a sub-option that controls this: ‘with_front’ => bool Should the permalink structure be prepended with the front base. (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/). Defaults to true So something like this: … ‘rewrite’ => … Read more

Flat media folder vs multiple directories

I recently took over a website that uses a flat media folder in the site root. Is there a benefit to that over using the standard WordPress media folder structure of uploads/year/month/file? Not particularly, mostly preference. Some people might do it thinking it enhances SEO, but I’ve seen no evidence to support that claim. My … Read more

production site routes to staging site after cloning

Check your production site’s wp-config.php file for one or both of these lines: define( ‘WP_HOME’, ‘https://example.com’ ); define( ‘WP_SITEURL’, ‘https://example.com’ ); …and set them as appropriate if they exist. These constants will override the settings in the database if they’re present. See Editing wp-config.php for details.

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