Just FYI:
After struggling for hours, I found the aswer. The line that was causing the problem is the following in my wp-config.php
file:
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . "https://wordpress.stackexchange.com/");
It turned out my WP_SITEURL
is not working correctly because I changed the directory structure as described in the question. So I modified wp-config.php
and it now looks like this:
define('WP_CONTENT_FOLDERNAME', 'green');
define('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/project01/');
define('WP_SITEURL', WP_HOME . 'red/');
define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);
Now, it works like a charm.
Related Posts:
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Custom maintenance page
- Any post install tips after installing WordPress 3.0.1?
- How to customize the default HTML for WordPress Attachments
- Customizing the Subject Field in WordPress’ Notification Emails?
- How to move wp-content (or uploads) outside of the WordPress directory
- How can I integrate pages written in something other than PHP?
- Maintaining synced staging/production WP sites
- WordPress Multi Site Best Practice
- Sub posts and non unique post_name
- Custom field values in permalink
- How to let a single post have its own domain name
- Redirect to requested page after (custom) login
- Custom protected password page with ACF
- Page load requires a trailing “/” [closed]
- How to instantly delete posts/pages permanently?
- Custom Dashboard Home Screen Options
- dynamic external javascript generated using php
- Show Custom Taxonomy Slug(s)?
- How to re-arrange media uploaded using : media_handle_upload() as per year / month
- What’s the proper way to use a custom table? [closed]
- How to retrieve the value stored in a multi-dimensional array and SUM the entries?
- Adding Pagination on a Custom Author Page
- How can a single line in a blog post take down my server?
- Updating Custom WordPress User Meta Field via REST API
- Defined Blogname Override?
- Not sure how I would go about doing this in WP.. related to custom tags
- Remove template drop down for certain pages
- Publishing html directly from ftp to wordpress
- how to get the categories for a single product in a hierarchical way
- large chunks of text went missing
- How to change popular term checklist title when edit post?
- Get Date of custom field and use conditional logic
- Sub menu indicator that links to sub menu
- Save & Publish disabled for two dimensional array Customizer
- Deep customization of wp-login.php
- What requirements for ACF custom fields key and name properties?
- Custom CSS at Appearance > Edit CSS is missing after update [closed]
- How to store page visit counts?
- Custom Search on Custom Page while preserving the main search function
- Load File (Function & Variable Value) from Child Theme
- Featured Image If Else Condition
- If the image variable is specified, show image, if not no code
- WordPress noob, assign custom stylesheet using @import or if? Didn’t work for me
- I want to print a message in post ” After one month from publish date”
- How to query details of images in gallery that is attached to a post
- Is there another way to customize a parent template file besides adding the file to a child theme?
- Replacing words in WordPress or theme (not in content)
- WordPress Child Theme Stylesheet being loaded before Parent’s minified .css
- How to create custom search page
- Where to store reusable content that is not a page
- WordPress broken after changing URL
- Many Rewrite Parameters/Rules
- Adding other links on header than LinkedIn, Facebook, Youtube etc
- How to have multiple WordPress Menus
- How to make the Pages in WordPress Customized?
- Custom “wp_login.php?action=lostpassword” and reset password
- Where to upload my new custom ShortCode in Separate .php file?
- kitchen sink not working
- wp_enqueue_script JS code runs too late (after user begins interacting)
- Is it possible to auto sharing post on social network from specifc categories or tags
- wp_insert_post custom taxonomy multiple Category not added
- Get custom text if in Category
- Conditional Logic on CF7 dropdown options
- Change admin_title of a plugin using code snippet/functions
- Validate user login in php
- Can’t upload format files on media library
- Adding a custom field to a slug
- Query Product categories what have a custom field
- How to show Term ID beside Name Category with wp_dropdown_categories()
- How to create custom backend admin menu in different languages?
- WordPress Performance and bulk edits
- How to have differents sites share the same tables of DB?
- How to add particular attribute of product in shop as well as home page
- Delete page titles
- Duplicate Header and Footer
- Send email notification when post type product is publish from pending status
- WordPress Customizer: Check for value of CSS selector and replace it
- Smarter Document Management links between three WordPress sites sought
- data retrieval presents last set of data
- How to add custom Author Info Box to blog posts “only” and NOT custom post templates
- Bio comes up when the visitor clicks on a picture
- How to find and replace (or add) specific word in a specific category?
- Accountless password generation
- Creating a Treeview Listing of a Directory
- WooCommerce – Adding custom HTML to specific product pages
- How do I move my sites to a child theme without loosing customisation?
- How to create new page can get custom field other post in wordpress
- How to appoint different users to different pages?
- Create a google friendly header with text and logo
- Disallow “contributors” to edit their own posts once they’ve been set to “Pending Review”
- insert autofocus in a custom taxonomy form
- display my pages html
- customize footer widgets area
- Accessing + retrieving custom database in WordPress
- updated permalink structure on localhost does not work
- Word Press Theme Customiser and Child theme Function.php
- Security Issues with custom user role or changing core role capabilities?
- adding new html css to wordpress section from codepen [closed]
- How can I make a search term redirect to a page