WordPress CDN Subdomain URL not accessible to the public
To prevent folder listing you could add an .htaccess file to the root of your subdomain with this content: Options -Indexes
To prevent folder listing you could add an .htaccess file to the root of your subdomain with this content: Options -Indexes
Since this is just a once a year thing, just install a new copy of WordPress each year with a different table prefix in the database settings. Change the site URL in the config of the old copy then move it to the folder for your subdomain. 5 minutes of work a year.
Two domain for one site not working in mobile
WordPress uses absolute links almost everywhere in its database. It means that if you want to change domain, you have to change all these links in DB. The easiest way is to export DB to SQL, find and replace all occurrences of old URL with the new one. But… This can break your DB – … Read more
This is because the database stores information about the old domain. Open the database in phpmyadmin and run this query. The code will replace the old domain with the new one. UPDATE wp_options SET option_value = replace(option_value, ‘https://mrafiee.net’, ‘https://old.rafiee.net’) WHERE option_name=”home” OR option_name=”siteurl”; UPDATE wp_posts SET guid = replace(guid, ‘https://mrafiee.net’,’https://old.rafiee.net’); UPDATE wp_posts SET post_content = … Read more
Network of subdomains [closed]
Will WordPress installed on a whole domain interfere with other files in a subdomain or subfolder?
is the folder for the subdomain named the same as the folder you want to run from? If so, it may be as simple as getting rid of the subdomain…. no longer pointing it to the folder. And then changing the 2 urls in settings-> general. Otherwise, review the moving instructions in the codex if … Read more
The path to your assets will vary based on where you are calling for those assets. For example, when referencing a background img URL in a CSS file, this path is relative to the location of the CSS file. Contrast this with asset calls inside page content – which are relative to the published page … Read more
The $_SERVER[‘HTTP_HOST’] global will usually contain the domain/subdomain to which the current request was sent, but with a few caveats. In the context of a web request, the variable is set at the discretion of the web server and proxies, and Apache/Nginx may not pass that header along depending on their configuration – or may … Read more